Sha256: 207e92e64e9e6d318021c418cb1f397ddbb5feb293ad7e32854b14dc441c0a17

Contents?: true

Size: 532 Bytes

Versions: 13

Compression:

Stored size: 532 Bytes

Contents

module Typus
  module Controller
    module ActsAs

      ##
      # Change item position:
      #
      #   params[:go] = 'move_to_top'
      #
      # Available positions are move_to_top, move_higher, move_lower, move_to_bottom.
      #
      # NOTE: Only works if `acts_as_list` is installed.
      #
      def position
        @item.send(params[:go])
        notice = Typus::I18n.t("%{model} successfully updated.", :model => @resource.model_name.human)
        redirect_to :back, :notice => notice
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
typus-3.0.12 lib/typus/controller/acts_as.rb
typus-3.0.11 lib/typus/controller/acts_as.rb
typus-3.0.11.rc5 lib/typus/controller/acts_as.rb
typus-3.0.11.rc4 lib/typus/controller/acts_as.rb
typus-3.0.11.rc3 lib/typus/controller/acts_as.rb
typus-3.1.0.rc6 lib/typus/controller/acts_as.rb
typus-3.1.0.rc5 lib/typus/controller/acts_as.rb
typus-3.1.0.rc4 lib/typus/controller/acts_as.rb
typus-3.1.0.rc3 lib/typus/controller/acts_as.rb
typus-3.1.0.rc2 lib/typus/controller/acts_as.rb
typus-3.0.11.rc2 lib/typus/controller/acts_as.rb
typus-3.0.11.rc1 lib/typus/controller/acts_as.rb
typus-3.1.0.rc1 lib/typus/controller/acts_as.rb