Flowdock
method

set_allowed_actions

Importance_0
v3.0.5 - Show latest stable - 0 notes - Class: ActionDispatch::Routing::DeprecatedMapper::Resource
set_allowed_actions() protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.