Sha256: 40754991668fd28879594a0f22f9d5c3b7634fc4a4782c54fe064110ada43cd7
Contents?: true
Size: 651 Bytes
Versions: 13
Compression:
Stored size: 651 Bytes
Contents
module Adminpanel module GalleryzableActions extend ActiveSupport::Concern def move_better resource = @model.find(params[:id]) resource.move_to_better_position respond end def move_worst resource = @model.find(params[:id]) resource.move_to_worst_position respond end private def respond respond_to do |format| format.js do render 'shared/gallery_entries', :locals => { :collection => @model.where( @model.relation_field.to_sym => resource.send(@model.relation_field) ) } end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems