Module: Origin::Optional
- Defined in:
- lib/mongoid_criteria_filter/origin_optional.rb
Instance Method Summary collapse
Instance Method Details
#has_additional_order? ⇒ Boolean
12 13 14 |
# File 'lib/mongoid_criteria_filter/origin_optional.rb', line 12 def has_additional_order? defined?(@additional_order) ? @additional_order : false end |
#order_by(*spec) ⇒ Object
7 8 9 10 |
# File 'lib/mongoid_criteria_filter/origin_optional.rb', line 7 def order_by(*spec) @additional_order = (not klass.default_scopable? or scoped?) original_order_by(*spec) end |
#original_order_by ⇒ Object
5 |
# File 'lib/mongoid_criteria_filter/origin_optional.rb', line 5 alias_method :original_order_by, :order_by |