Module: Datagrid::Ordering::InstanceMethods
- Defined in:
- lib/datagrid/ordering.rb
Instance Method Summary collapse
-
#order_column ⇒ Datagrid::Columns::Column?
A column definition that is currently used to order assets.
-
#ordered_by?(column) ⇒ Boolean
True if given grid is ordered by given column.
Instance Method Details
#order_column ⇒ Datagrid::Columns::Column?
Returns a column definition that is currently used to order assets.
56 57 58 |
# File 'lib/datagrid/ordering.rb', line 56 def order_column order ? column_by_name(order) : nil end |
#ordered_by?(column) ⇒ Boolean
Returns true if given grid is ordered by given column.
62 63 64 |
# File 'lib/datagrid/ordering.rb', line 62 def ordered_by?(column) order_column == column_by_name(column) end |