ActiveRecord OR query Hash notation

There are 5 options that could be considered as implementations of «Hash notation» (the last two are kinda hash-ish): With Ruby on Rails 5 you are able to do the following chaining using ActiveRecord::Relation#or method: Person.where(name: ‘Neil’).or(Person.where(age: 27)) Use where_values together with reduce. The unscoped method is necessary only for Rails 4.1+ to ensure default_scope … Read more