instance method helper_attr

Ruby on Rails 2.3.18

Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

helper_attr(*attrs)

Declare a controller attribute as a helper. For example,

helper_attr :name
attr_accessor :name

makes the name and name= controller methods available in the view. The is a convenience wrapper for helper_method.

Parameters

attrs rest
Source
# File actionmailer/lib/action_mailer/helpers.rb, line 88
      def helper_attr(*attrs)
        attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") }
      end

Defined in actionmailer/lib/action_mailer/helpers.rb line 88 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionMailer::Helpers::ClassMethods

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close