Module: ActionMailer::Helpers::ClassMethods

Module | ActionMailer::Helpers::ClassMethods
In: | lib/action_mailer/helpers.rb

### Methods

helper helper_attr helper_method

### Public Instance methods

helper(*args, &block)

Declare a helper:

      helper :foo

requires ‘foo_helper’ and includes FooHelper in the template class.

      helper FooHelper

includes FooHelper in the template class.

      helper { def foo() "#{bar} is the very best" end }

evaluates the block in the template class, adding method foo.

      helper(:three, BlindHelper) { def mice() 'mice' end }

does all three.

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.

helper_method(*methods)

Declare a controller method as a helper. For example,

      helper_method :link_to
      def link_to(name, options) ... end

makes the link_to controller method available in the view.

[Validate]