Dynamic find methods Vs conditional statements in rails
- by piemesons
Hello
Student.find_all_by_name_and_status(‘mohit’, 1)
As this will create a exception 'No method exception' first then it will be handled by dynamic Method handler
and this will not
Student.find(:all, :conditions => [‘name = ? and status = ?’ ‘mohit’, 1])
Does
Student.find(1)
Will generate method missing exception and will it prevent SQL injection?