Module: Mongoid::DataTable::ClassMethods
- Defined in:
- lib/mongoid/data_table.rb
Instance Method Summary collapse
- #data_table_dataset ⇒ Object
- #data_table_fields ⇒ Object
- #data_table_searchable_fields ⇒ Object
- #data_table_sortable_fields ⇒ Object
- #to_data_table(controller, options = {}, &block) ⇒ Object
Instance Method Details
#data_table_dataset ⇒ Object
36 37 38 |
# File 'lib/mongoid/data_table.rb', line 36 def data_table_dataset self.[:dataset] end |
#data_table_fields ⇒ Object
24 25 26 |
# File 'lib/mongoid/data_table.rb', line 24 def data_table_fields self.[:fields] ||= self.fields.dup.stringify_keys.keys.reject { |k| Mongoid.destructive_fields.include?(k) } end |
#data_table_searchable_fields ⇒ Object
28 29 30 |
# File 'lib/mongoid/data_table.rb', line 28 def data_table_searchable_fields self.[:searchable] ||= self.data_table_fields end |
#data_table_sortable_fields ⇒ Object
32 33 34 |
# File 'lib/mongoid/data_table.rb', line 32 def data_table_sortable_fields self.[:sortable] ||= self.data_table_fields end |