method

set_allowed_actions

rails latest stable - Class: ActionDispatch::Routing::DeprecatedMapper::Resource

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

set_allowed_actions()
protected

No documentation available.

# File actionpack/lib/action_dispatch/routing/deprecated_mapper.rb, line 302
          def set_allowed_actions
            only, except = @options.values_at(:only, :except)
            @allowed_actions ||= {}

            if only == :all || except == :none
              only = nil
              except = []
            elsif only == :none || except == :all
              only = []
              except = nil
            end

            if only
              @allowed_actions[:only] = Array(only).map {|a| a.to_sym }
            elsif except
              @allowed_actions[:except] = Array(except).map {|a| a.to_sym }
            end
          end