Permalink
Browse files

don't need to eval everything

  • Loading branch information...
1 parent 170fb5c commit 345fc3badba96f49bfdc3babb6e051b221ef81b8 @tenderlove tenderlove committed Jan 24, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -185,8 +185,8 @@ def define_named_route_methods(name, route)
# 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}

0 comments on commit 345fc3b

Please sign in to comment.