mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
AC::Base#url_for is a public method
This commit is contained in:
parent
d41939a678
commit
666897a025
1 changed files with 3 additions and 3 deletions
|
@ -418,9 +418,9 @@ module AbstractController
|
|||
|
||||
controller = kls.new
|
||||
params = { action: :index, controller: :posts, format: :xml }
|
||||
assert_equal("http://www.basecamphq.com/posts.xml", controller.send(:url_for, params))
|
||||
assert_equal("http://www.basecamphq.com/posts.xml", controller.url_for(params))
|
||||
params[:format] = nil
|
||||
assert_equal("http://www.basecamphq.com/", controller.send(:url_for, params))
|
||||
assert_equal("http://www.basecamphq.com/", controller.url_for(params))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -472,7 +472,7 @@ module AbstractController
|
|||
|
||||
controller = kls.new
|
||||
assert_equal("http://www.basecamphq.com/admin/posts/new?param=value",
|
||||
controller.send(:url_for, [:new, :admin, :post, { param: "value" }])
|
||||
controller.url_for([:new, :admin, :post, { param: "value" }])
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue