mirror of
https://github.com/github/rails.git
synced 2026-02-11 14:45:16 -05:00
Dont encourage custom url options to be called with symbol #2047
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -433,20 +433,6 @@ module ActionController #:nodoc:
|
||||
#
|
||||
# This takes the current URL as is and only exchanges the action. In contrast, <tt>url_for :action => 'print'</tt>
|
||||
# would have slashed-off the path components are the changed action.
|
||||
#
|
||||
# Instead of passing an options hash, you can also pass a method reference in the form of a symbol. Consider this example:
|
||||
#
|
||||
# class WeblogController < ActionController::Base
|
||||
# def update
|
||||
# # do some update
|
||||
# redirect_to :dashboard_url
|
||||
# end
|
||||
#
|
||||
# protected
|
||||
# def dashboard_url
|
||||
# url_for :controller => (@project.active? ? "project" : "account"), :action => "dashboard"
|
||||
# end
|
||||
# end
|
||||
def url_for(options = {}, *parameters_for_method_reference) #:doc:
|
||||
case options
|
||||
when String then options
|
||||
|
||||
Reference in New Issue
Block a user