Skip to content

Instantly share code, notes, and snippets.

@febuiles
Created July 13, 2015 21:38
Show Gist options
  • Save febuiles/f7be342286a9227ad3d8 to your computer and use it in GitHub Desktop.
Save febuiles/f7be342286a9227ad3d8 to your computer and use it in GitHub Desktop.
RS.where(city: [f1, f2, f3]) = > select * where RS where id in [1,2,3] and
RS.where(city: f2.city) +
RS.where(city: f3.city)
Loading development environment (Rails 4.2.1)
=> Rails.version
irb(main):001:0> => "4.2.1"
irb(main):002:0> User.where(name: "Foo").or(where(name: "bar"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment