module Rexport::ExportItemMethods::ClassMethods
Public Instance Methods
resort(export_item_ids)
click to toggle source
# 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