Method: MagicGrid::Order.from_param
- Defined in:
- lib/magic_grid/order.rb
.from_param(something) ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/magic_grid/order.rb', line 58 def self.from_param(something) case something when 1, "1", :desc, :DESC, "desc", "DESC", Descending Descending #when 0, "0", :asc, :ASC, "asc", "ASC", Ascending # Ascending else Ascending end end |