vendor/bundle/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb
# CANONICAL_ACTIONS holds all actions that does not need a prefix or
# a path appended since they fit properly in their scope level.
CANONICAL_ACTIONS holds all actions that does not need a prefix or
a path appended since they fit properly in their scope level.
CANONICAL_ACTIONS holds all actions that does not need a prefix or a path appended since they fit properly in their scope level .
def add_route(action, options) 
          path = path_for_action(action, options.delete(:path))
          action = action.to_s.dup
          if action =~ /^[\w\/]+$/
            options[:action] ||= action unless action.include?("/")
          else
            action = nil
          end
          if !options.fetch(:as, true)
            options.delete(:as)
          else
            options[:as] = name_for_action(options[:as], action)
          end
          mapping = Mapping.new(@set, @scope, URI.parser.escape(path), options)
          app, conditions, requirements, defaults, as, anchor = mapping.to_route
          @set.add_route(app, conditions, requirements, defaults, as, anchor)
        end
def add_route ( action , options ) path = path_for_action ( action , options . delete ( :path ) ) action = action . to_s . dup if action =~ / ^[ \w \/ ]+$ / options [ :action ] ||= action unless action . include? ( "/" ) else action = nil end if ! options . fetch ( :as , true ) options . delete ( :as ) else options [ :as ] = name_for_action ( options [ :as ] , action ) end mapping = Mapping . new ( @set , @scope , URI . parser . escape ( path ) , options ) app , conditions , requirements , defaults , as , anchor = mapping . to_route @set . add_route ( app , conditions , requirements , defaults , as , anchor ) end
CANONICAL_ACTIONS holds all actions that does not need a prefix or
a path appended since they fit properly in their scope level.
CANONICAL_ACTIONS holds all actions that does not need a prefix or a path appended since they fit properly in their scope level .
# :nodoc:
action
<not_specific>
options
<not_specific>