instance method helper_method

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

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.

Parameters

methods rest
Source
# File actionmailer/lib/action_mailer/helpers.rb, line 73
      def helper_method(*methods)
        methods.flatten.each do |method|
          master_helper_module.module_eval <<-end_eval
            def #{method}(*args, &block)
              controller.__send__(%(#{method}), *args, &block)
            end
          end_eval
        end
      end

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

Defined in ActionMailer::Helpers::ClassMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close