instance method
helper_method
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available 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
-
methodsrest
Source
# File actionmailer/lib/action_mailer/helpers.rb, line 71
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 71
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionMailer::Helpers::ClassMethods