Sha256: 2694bee9093be3429552cca63df532d15bbe1981b125445463ffc499e21e9e69
Contents?: true
Size: 640 Bytes
Versions: 13
Compression:
Stored size: 640 Bytes
Contents
# Module designed to work with `acts_as_list`. require 'active_support/concern' module Admin module ActsAsList extend ActiveSupport::Concern included do before_filter :get_object, :only => [:position] before_filter :check_resource_ownership, :only => [:position] end def position if %w(move_to_top move_higher move_lower move_to_bottom).include?(params[:go]) @item.send(params[:go]) notice = Typus::I18n.t("%{model} successfully updated.", :model => @resource.model_name.human) redirect_to :back, :notice => notice else not_allowed end end end end
Version data entries
13 entries across 13 versions & 1 rubygems