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
8 9 10 |
# File 'lib/rails_or.rb', line 8 def or(*other) return rails5_or(rails_or_parse_parameter(*other)) end |
#or_having(*args) ⇒ Object
33 34 35 |
# File 'lib/rails_or.rb', line 33 def or_having(*args) self.or(klass.having(*args)) end |
#or_not(*args) ⇒ Object
29 30 31 32 |
# File 'lib/rails_or.rb', line 29 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
7 |
# File 'lib/rails_or.rb', line 7 alias rails5_or or |