Module: RailsSortable::Model::ClassMethods
- Defined in:
- app/models/rails_sortable/model.rb
Instance Method Summary collapse
-
#set_sortable(attribute, options = {}) ⇒ Object
allowed options - without_updating_timestamps When it is true, timestamp(updated_at) will be NOT touched on reordering.
Instance Method Details
#set_sortable(attribute, options = {}) ⇒ Object
allowed options
-
without_updating_timestamps
When it is true, timestamp(updated_at) will be NOT touched on reordering.
61 62 63 64 |
# File 'app/models/rails_sortable/model.rb', line 61 def set_sortable(attribute, = {}) self.define_singleton_method(:sort_attribute) { attribute } self.define_singleton_method(:sortable_options) { } end |