Module: Rexport::ExportItemMethods::ClassMethods
- Defined in:
- lib/rexport/export_item_methods.rb
Instance Method Summary collapse
Instance Method Details
#resort(export_item_ids) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/rexport/export_item_methods.rb', line 19 def resort(export_item_ids) transaction do export_item_ids.each_with_index do |id, index| find(id.gsub(/[^0-9]/, "")).update_attribute(:position, index + 1) end end end |