Changeset 4733
- Timestamp:
- 08/09/06 00:02:08 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (2 diffs)
- trunk/actionpack/lib/action_controller/routing.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4728 r4733 1 1 *SVN* 2 2 3 <<<<<<< .mine 3 * Add RoutingError exception when RouteSet fails to generate a path from a Named Route. [Rick Olson] 4 4 5 * Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar] 5 6 6 =======7 7 * Deprecation: check whether instance variables have been monkeyed with before assigning them to deprecation proxies. Raises a RuntimeError if so. [Jeremy Kemper] 8 8 … … 11 11 * Deprecation! @params, @session, @flash will be removed after 1.2. Use the corresponding instance methods instead. You'll get printed warnings during tests and logged warnings in dev mode when you access either instance variable directly. [Jeremy Kemper] 12 12 13 >>>>>>> .r472714 13 * Make Routing noisy when an anchor regexp is assigned to a segment. #5674 [francois.beausoleil@gmail.com] 15 14 trunk/actionpack/lib/action_controller/routing.rb
r4700 r4733 982 982 983 983 def generate(options, recall = {}, method=:generate) 984 if options[:use_route] 984 named_route_name = options.delete(:use_route) 985 if named_route_name 985 986 options = options.dup 986 named_route = named_routes[ options.delete(:use_route)]987 named_route = named_routes[named_route_name] 987 988 options = named_route.parameter_shell.merge(options) 988 989 end … … 1007 1008 1008 1009 if named_route 1009 return named_route.generate(options, merged, expire_on) 1010 path = named_route.generate(options, merged, expire_on) 1011 raise RoutingError, "#{named_route_name}_url failed to generate from #{options.inspect}, missing: #{(named_route.significant_keys - options.keys).inspect}" if path.nil? 1012 return path 1010 1013 else 1011 1014 merged[:action] ||= 'index' … … 1015 1018 action = merged[:action] 1016 1019 1017 raise "Need controller and action!" unless controller && action1020 raise RoutingError, "Need controller and action!" unless controller && action 1018 1021 # don't use the recalled keys when determining which routes to check 1019 1022 routes = routes_by_controller[controller][action][options.keys.sort_by { |x| x.object_id }]