Flowdock
method

helper

Importance_1
v2.2.1 - Show latest stable - 0 notes - Class: ActionMailer::Helpers::ClassMethods
helper(*args, &block) public

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.

Show source
Register or log in to add new notes.