Flowdock
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.