Sha256: e5f3d2153d60704726daf42bb1e2f7a62672e31fe3e999335a5926b528cb5d3d
Contents?: true
Size: 322 Bytes
Versions: 33
Compression:
Stored size: 322 Bytes
Contents
module Headmin module ActsAsList def handle_positions(model:) position_params[:ids].each_with_index do |id, index| model.where(id: id).update_all(position: index + 1) end head :no_content end private def position_params params.permit(:locale, ids: []) end end end
Version data entries
33 entries across 33 versions & 1 rubygems