Class: Deli::Adapters::ActiveRecord::Order
- Includes:
- Param::Order
- Defined in:
- lib/deli/adapters/active_record.rb
Instance Attribute Summary
Attributes inherited from Param
Attributes inherited from Param
#controller, #default, #exact, #key, #model_name, #namespace
Instance Method Summary collapse
Methods included from Param::Order
Methods inherited from Param
#configure_clauses, #find_association, #initialize, #match_operator, #operators, #parenthesize!, #parse, #postgres?, #render_name, #render_operator, #render_value
Methods inherited from Param
#initialize, #inspect, #parse, #parse_value
Constructor Details
This class inherits a constructor from Deli::Adapters::ActiveRecord::Param
Instance Method Details
#render(value) ⇒ Object
239 240 241 242 243 |
# File 'lib/deli/adapters/active_record.rb', line 239 def render(value) parse(value).map do |item| "#{render_name(item[:namespace], item[:key])} #{item[:operators][0] == "+" ? "ASC" : "DESC"}" end.join(", ") end |