Method: Ransack::Nodes::Sort.extract
- Defined in:
- lib/ransack/nodes/sort.rb
.extract(context, str) ⇒ Object
10 11 12 13 14 |
# File 'lib/ransack/nodes/sort.rb', line 10 def extract(context, str) return unless str attr, direction = str.split(/\s+/,2) self.new(context).build(name: attr, dir: direction) end |