Class: ActiveRecord::Relation
- Inherits:
-
Object
- Object
- ActiveRecord::Relation
- Defined in:
- lib/rails_or.rb
Constant Summary collapse
- IS_RAILS3_FLAG =
Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new('4.0.0')
Instance Method Summary collapse
Instance Method Details
#or(*other) ⇒ Object
9 10 11 |
# File 'lib/rails_or.rb', line 9 def or(*other) return rails5_or(rails_or_parse_parameter(*other)) end |
#or_having(*args) ⇒ Object
41 42 43 |
# File 'lib/rails_or.rb', line 41 def or_having(*args) self.or(klass.having(*args)) end |
#or_not(*args) ⇒ Object
37 38 39 40 |
# File 'lib/rails_or.rb', line 37 def or_not(*args) raise 'This method is not support in Rails 3' if IS_RAILS3_FLAG return self.or(klass.where.not(*args)) end |
#rails5_or ⇒ Object
8 |
# File 'lib/rails_or.rb', line 8 alias rails5_or or |