ActiveRecord finder: Now we can use hash as conditions
Earlier conditions can either be specified as a string or array now in edge rails we can specify hash also. So if we specify conditions as hash then it will generate conditions based on equality with SQL AND. Example: [source:ruby]User.find(:all, :conditions=>{:first_name => ‘akhil’, :role => ‘admin’}) [/source] will generate SQL as “where `first_name` = ‘akhil’ … Continue reading ActiveRecord finder: Now we can use hash as conditions