aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/routing/route.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/routing/route.rb b/actionpack/lib/action_controller/routing/route.rb
index e4dfdb1718..e2077edad8 100644
--- a/actionpack/lib/action_controller/routing/route.rb
+++ b/actionpack/lib/action_controller/routing/route.rb
@@ -127,6 +127,16 @@ module ActionController
super
end
+ def generate(options, hash, expire_on = {})
+ path, hash = generate_raw(options, hash, expire_on)
+ append_query_string(path, hash, extra_keys(options))
+ end
+
+ def generate_extras(options, hash, expire_on = {})
+ path, hash = generate_raw(options, hash, expire_on)
+ [path, extra_keys(options)]
+ end
+
private
def requirement_for(key)
return requirements[key] if requirements.key? key
@@ -155,11 +165,6 @@ module ActionController
# the query string. (Never use keys from the recalled request when building the
# query string.)
- method_decl = "def generate(#{args})\npath, hash = generate_raw(options, hash, expire_on)\nappend_query_string(path, hash, extra_keys(options))\nend"
- instance_eval method_decl, "generated code (#{__FILE__}:#{__LINE__})"
-
- method_decl = "def generate_extras(#{args})\npath, hash = generate_raw(options, hash, expire_on)\n[path, extra_keys(options)]\nend"
- instance_eval method_decl, "generated code (#{__FILE__}:#{__LINE__})"
raw_method
end