diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-01-24 15:24:07 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-01-24 15:24:07 -0800 |
commit | 345fc3badba96f49bfdc3babb6e051b221ef81b8 (patch) | |
tree | e4219357d85fd46b2efe31a26a5f5e36fa111f87 /actionpack | |
parent | 170fb5c80c990688f5f372a3ba0e6cb75fb6edf0 (diff) | |
download | rails-345fc3badba96f49bfdc3babb6e051b221ef81b8.tar.gz rails-345fc3badba96f49bfdc3babb6e051b221ef81b8.tar.bz2 rails-345fc3badba96f49bfdc3babb6e051b221ef81b8.zip |
don't need to eval everything
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index c72310cca3..66d4706228 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -185,8 +185,8 @@ module ActionDispatch # foo_url(bar, baz, bang, sort_by: 'baz') # def define_url_helper(route, name, options) + @module.remove_possible_method name @module.module_eval <<-END_EVAL, __FILE__, __LINE__ + 1 - remove_possible_method :#{name} def #{name}(*args) if #{optimize_helper?(route)} && args.size == #{route.required_parts.size} && !args.last.is_a?(Hash) && optimize_routes_generation? options = #{options.inspect} |