app/controllers/concerns/occams/reorder_action.rb in occams-1.0.8 vs app/controllers/concerns/occams/reorder_action.rb in occams-1.1.0
- old
+ new
@@ -10,8 +10,11 @@
def reorder
resource_class = self.class.reorder_action_resource
(params.permit(order: [])[:order] || []).each_with_index do |id, index|
resource_class.where(id: id).update_all(position: index)
end
+ if resource_class == ::Occams::Cms::Page
+ Occams::Cms::Page.all.each(&:save!)
+ end
head :ok
end
end