Module: Origin::Optional
- Defined in:
- lib/by_star/orm/mongoid/reorder.rb
Instance Method Summary collapse
-
#reorder(*spec) ⇒ Optional
Instead of merging the order criteria, use this method to completely replace the existing ordering with the provided.
Instance Method Details
#reorder(*spec) ⇒ Optional
Instead of merging the order criteria, use this method to completely replace the existing ordering with the provided.
17 18 19 20 |
# File 'lib/by_star/orm/mongoid/reorder.rb', line 17 def reorder(*spec) .delete(:sort) order_by(*spec) end |