Module: ActiveRecordQuery::Orderable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/active_record_query/concerns/orderable.rb
Instance Method Summary collapse
Instance Method Details
#build_order(scope) ⇒ Object
16 17 18 19 20 |
# File 'lib/active_record_query/concerns/orderable.rb', line 16 def build_order(scope) arg_stacker = ArgumentStacker.new(self, :order_by) args = arg_stacker.list args.present? ? scope.order(args) : scope end |