提交 0d82b146 编写于 作者: M Marcel Molina

Correct example for path parameters to use strings as keys in the hash rather...

Correct example for path parameters to use strings as keys in the hash rather than symbols. Closes #7160 [akaspick]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 2e47db2f
...@@ -297,11 +297,12 @@ def symbolized_path_parameters ...@@ -297,11 +297,12 @@ def symbolized_path_parameters
@symbolized_path_parameters ||= path_parameters.symbolize_keys @symbolized_path_parameters ||= path_parameters.symbolize_keys
end end
# Returns a hash with the parameters used to form the path of the request # Returns a hash with the parameters used to form the path of the request.
# Returned hash keys are strings. See <tt>symbolized_path_parameters</tt> for symbolized keys.
# #
# Example: # Example:
# #
# {:action => 'my_action', :controller => 'my_controller'} # {'action' => 'my_action', 'controller' => 'my_controller'}
def path_parameters def path_parameters
@path_parameters ||= {} @path_parameters ||= {}
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册