Module: ActiveManageable::Methods::Auxiliary::Order
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_manageable/methods/auxiliary/order.rb
Instance Method Summary collapse
-
#default_order ⇒ Object
Returns the default order attributes from the class attribute that can contain an array of attribute names or name & direction strings or a lambda/proc to execute to return an array of attribute names.
Instance Method Details
#default_order ⇒ Object
Returns the default order attributes from the class attribute that can contain an array of attribute names or name & direction strings or a lambda/proc to execute to return an array of attribute names
25 26 27 |
# File 'lib/active_manageable/methods/auxiliary/order.rb', line 25 def default_order defaults[:order].is_a?(Proc) ? instance_exec(&defaults[:order]) : defaults[:order] end |