ActionView::Helpers::UrlHelper (Module)

In: vendor/actionpack/lib/action_view/helpers/url_helper.rb

Provides a set of methods for making easy links and getting urls that depend on the controller and action. This means that you can use the same format for links in the views that you do in the controller. The different methods are even named synchronously, so link_to uses that same url as is generated by url_for, which again is the same url used for redirection in redirect_to.

Methods

link_to   url_for  

Public Instance methods

Creates a link tag of the given name using an URL created by the set of options. See the valid options in ../../ActionController/Base.html#M000021

[Source]

    # File vendor/actionpack/lib/action_view/helpers/url_helper.rb, line 10
10:       def link_to(name, options = {}, html_options = {})
11:         "<a href='#{url_for(options)}'#{tag_options(html_options)}>#{name}</a>"
12:       end

Returns the URL for the set of options provided. See the valid options in ../../ActionController/Base.html#M000021

[Source]

    # File vendor/actionpack/lib/action_view/helpers/url_helper.rb, line 15
15:       def url_for(options = {})
16:         @controller.send(:url_for, options).gsub("&", "&amp;")
17:       end

[Validate]