Skip to content
Browse files

Fix link_to return value

The documentation is showing the link_to method as just returning
the contents of the url_for method. It should be returning an
"<a>" tag with the correct href set.
  • Loading branch information...
1 parent 7fe1f0f commit 3189961f76bc35b95eb5bc64a01c7626e1077d11 @estsauver estsauver committed Sep 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/url_for.rb
View
2 actionpack/lib/action_dispatch/routing/url_for.rb
@@ -20,7 +20,7 @@ module Routing
#
# <%= link_to('Click here', controller: 'users',
# action: 'new', message: 'Welcome!') %>
- # # => "/users/new?message=Welcome%21"
+ # # => <a href="/users/new?message=Welcome%21">Click here</a>
#
# link_to, and all other functions that require URL generation functionality,
# actually use ActionController::UrlFor under the hood. And in particular,

0 comments on commit 3189961

Please sign in to comment.
Something went wrong with that request. Please try again.