Rails 4
Controller:
http://guides.rubyonrails.org/4_2_release_notes.html
If you use the
Controller:
def absolute_url request.base_url + request.original_fullpath end
Action Mailer Notable changes in 4.2 release:
http://guides.rubyonrails.org/4_2_release_notes.html
link_to
andurl_for
generate absolute URLs by default in templates, it is no longer needed to passonly_path: false
. (Commit)
If you use the
_url
suffix, the generated URL is absolute. Use _path
to get a relative URL.<%= link_to "User Home", user_url %>
No comments:
Post a Comment