Sha256: 6ff6787598635b99976454357dcb3b3603d6cb669f795fe3f86a1efd0ab8e9ab

Contents?: true

Size: 346 Bytes

Versions: 19

Compression:

Stored size: 346 Bytes

Contents

module Cms
  module Fortress
    module PagesControllerMethods

      def transit_to_state
        @page.send(params.fetch(:transition)) if params[:transition].present?
      end

      def self.included(base)
        base.class_eval do
          before_action :transit_to_state, only: [:create, :update]
        end
      end

    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cms-fortress-1.3.15 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.14 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.13 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.12 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.11 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.10 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.9 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.8 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.7 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.6 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.5 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.4 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.3 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.2 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.1 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.0 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.0.rc3 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.0.rc2 lib/cms/fortress/pages_controller_methods.rb
cms-fortress-1.3.0.rc1 lib/cms/fortress/pages_controller_methods.rb