diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-05-06 12:44:03 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-05-06 12:47:32 -0700 |
commit | a29bc1cf7b8580a815523e4c3a79e931f03ab8c2 (patch) | |
tree | 306a94759830a7cf313faef09874e6dd0830a365 /actionpack/lib/action_dispatch/routing | |
parent | 9d03e20b1969c267a524873907f6993e351cfc97 (diff) | |
download | rails-a29bc1cf7b8580a815523e4c3a79e931f03ab8c2.tar.gz rails-a29bc1cf7b8580a815523e4c3a79e931f03ab8c2.tar.bz2 rails-a29bc1cf7b8580a815523e4c3a79e931f03ab8c2.zip |
Fix that optimized named routes should also work as singleton methods on the url_helpers module
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 7abd7bd008..8fc0f283fc 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -188,7 +188,8 @@ module ActionDispatch remove_possible_method :#{selector} def #{selector}(*args) if #{optimize_helper?(route)} && args.size == #{route.required_parts.size} && !args.last.is_a?(Hash) && optimize_routes_generation? - options = #{options.inspect}.merge!(url_options) + options = #{options.inspect} + options.merge!(url_options) if respond_to?(:url_options) options[:path] = "#{optimized_helper(route)}" ActionDispatch::Http::URL.url_for(options) else |