aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-07-17 11:26:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-07-17 11:26:59 -0700
commit932386be8a9c0f60c7bb078261c5433aeccb3284 (patch)
tree61266f97397030d54325656523b7f6145cfb0679 /actionpack
parent212057b912627b9c4056f911a43c83b18ae3ab34 (diff)
downloadrails-932386be8a9c0f60c7bb078261c5433aeccb3284.tar.gz
rails-932386be8a9c0f60c7bb078261c5433aeccb3284.tar.bz2
rails-932386be8a9c0f60c7bb078261c5433aeccb3284.zip
`recall` should be `path_parameters`, also make it required
"recall" is a terrible name. This variable contains the parameters that we got from the path (e.g. for "/posts/1" it has :controller => "posts", :id => "1"). Since it contains the parameters we got from the path, "path_parameters" is a better name. We always pass path_parameters to `generate`, so lets make it required.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/journey/formatter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/journey/formatter.rb b/actionpack/lib/action_dispatch/journey/formatter.rb
index 6d58323789..59b353b1b7 100644
--- a/actionpack/lib/action_dispatch/journey/formatter.rb
+++ b/actionpack/lib/action_dispatch/journey/formatter.rb
@@ -12,12 +12,12 @@ module ActionDispatch
@cache = nil
end
- def generate(name, options, recall = {}, parameterize = nil)
- constraints = recall.merge(options)
+ def generate(name, options, path_parameters, parameterize = nil)
+ constraints = path_parameters.merge(options)
missing_keys = []
match_route(name, constraints) do |route|
- parameterized_parts = extract_parameterized_parts(route, options, recall, parameterize)
+ parameterized_parts = extract_parameterized_parts(route, options, path_parameters, parameterize)
# Skip this route unless a name has been provided or it is a
# standard Rails route since we can't determine whether an options