lib/gemcache/ruby/1.9.1/gems/actionpack-3.2.2/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 apply_common_behavior_for(method, resources, options, &block) 
            if resources.length > 1
              resources.each { |r| send(method, r, options, &block) }
              return true
            end
            if resource_scope?
              nested { send(method, resources.pop, options, &block) }
              return true
            end
            options.keys.each do |k|
              (options[:constraints] ||= {})[k] = options.delete(k) if options[k].is_a?(Regexp)
            end
            scope_options = options.slice!(*RESOURCE_OPTIONS)
            unless scope_options.empty?
              scope(scope_options) do
                send(method, resources.pop, options, &block)
              end
              return true
            end
            unless action_options?(options)
              options.merge!(scope_action_options) if scope_action_options?
            end
            false
          end
def apply_common_behavior_for ( method , resources , options , & block ) if resources . length > 1 resources . each { | r | send ( method , r , options , & block ) } return true end if resource_scope? nested { send ( method , resources . pop , options , & block ) } return true end options . keys . each do | k | ( options [ :constraints ] ||= { } ) [ k ] = options . delete ( k ) if options [ k ] . is_a? ( Regexp ) end scope_options = options . slice! ( * RESOURCE_OPTIONS ) unless scope_options . empty? scope ( scope_options ) do send ( method , resources . pop , options , & block ) end return true end unless action_options? ( options ) options . merge! ( scope_action_options ) if scope_action_options? end false 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:
method
<not_specific>
resources
<not_specific>
options
<not_specific>
block
<not_specific>