I have this query in rails:
Extra.where("form_type = ?", 1)
However I would like to add a filter so the state also has to be Alabama. How can I do this? I tried this but it wouldn’t work
Extra.where("form_type = ?", 1).and("state = ?", "Alabama")
Thanks in advance
Use a hash to specify AND conditions:
Extra.where(:form_type => 1, :state => “Alabama”)