layout

layout(layout, conditions = {}) Instance Public methods Specify the layout to use for this class. If the specified layout is a: String the String is the template name Symbol call the method specified by the symbol, which will return the template name false There is no layout true raise an ArgumentError nil Force default layout behavior with inheritance Parameters layout - The layout to use. Options (conditions) :only - A list of actions to apply this layout

mail_to

mail_to(email_address, name = nil, html_options = {}, &block) Instance Public methods Creates a mailto link tag to the specified email_address, which is also used as the name of the link unless name is specified. Additional HTML attributes for the link can be passed in html_options. mail_to has several methods for customizing the email itself by passing special keys to html_options. Options :subject - Preset the subject line of the email. :body - Preset the body of the email

link_to_unless_current

link_to_unless_current(name, options = {}, html_options = {}, &block) Instance Public methods Creates a link tag of the given name using a URL created by the set of options unless the current request URI is the same as the links, in which case only the name is returned (or the given block is yielded, if one exists). You can give link_to_unless_current a block which will specialize the default behavior (e.g., show a âStart Hereâ link rather than the link's text). Examples Let's

link_to_unless

link_to_unless(condition, name, options = {}, html_options = {}, &block) Instance Public methods Creates a link tag of the given name using a URL created by the set of options unless condition is true, in which case only the name is returned. To specialize the default behavior (i.e., show a login link rather than just the plaintext link text), you can pass a block that accepts the name or the full argument list for link_to_unless. Examples <%= link_to_unless(@current_user.ni

link_to_if

link_to_if(condition, name, options = {}, html_options = {}, &block) Instance Public methods Creates a link tag of the given name using a URL created by the set of options if condition is true, otherwise only the name is returned. To specialize the default behavior, you can pass a block that accepts the name or the full argument list for link_to_unless (see the examples in link_to_unless). Examples <%= link_to_if(@current_user.nil?, "Login", { controller: "sessions", action:

link_to

link_to(name = nil, options = nil, html_options = nil, &block) Instance Public methods Creates a link tag of the given name using a URL created by the set of options. See the valid options in the documentation for url_for. It's also possible to pass a String instead of an options hash, which generates a link tag that uses the value of the String as the href for the link. Using a :back Symbol instead of an options hash will generate a link to the referrer (a JavaScript back link

current_page?

current_page?(options) Instance Public methods True if the current request URI was generated by the given options. Examples Let's say we're in the http://www.example.com/shop/checkout?order=desc action. current_page?(action: 'process') # => false current_page?(controller: 'shop', action: 'checkout') # => true current_page?(controller: 'shop', action: 'checkout', order: 'asc') # => false current_page?(action: 'checkout') # => true current_page?(controller: 'library',

button_to

button_to(name = nil, options = nil, html_options = nil, &block) Instance Public methods Generates a form containing a single button that submits to the URL created by the set of options. This is the safest method to ensure links that cause changes to your data are not triggered by search bots or accelerators. If the HTML button does not work with your layout, you can also consider using the link_to method with the :method modifier as described in the link_to documentation. By

_url_for_modules

_url_for_modules() Instance Public methods

translate

translate(key, options = {}) Instance Public methods Delegates to I18n#translate but also performs three additional functions. First, it will ensure that any thrown MissingTranslation messages will be turned into inline spans that: * have a "translation-missing" class set, * contain the missing key as a title attribute and * a titleized version of the last key segment as a text. E.g. the value returned for a missing translation key :âblog.post.titleâ will be <span class=âtransl