Module: RailsJqGrid::ActsAsJqGridAble::ClassMethods
- Defined in:
- lib/rails_jq_grid/acts_as_jq_grid_able.rb
Instance Method Summary collapse
-
#order_by_cols(*args) ⇒ Object
Contains an array of column names which can safely be used for order by.
Instance Method Details
#order_by_cols(*args) ⇒ Object
Contains an array of column names which can safely be used for order by. Columns not configured here can’t be user by #order_by
33 34 35 36 37 38 |
# File 'lib/rails_jq_grid/acts_as_jq_grid_able.rb', line 33 def order_by_cols(*args) self.allowed_order_by_cols ||= [] self.allowed_order_by_cols.push(args.map{|arg| arg.to_s}) self.allowed_order_by_cols.flatten! end |