method

helper_attr

helper_attr(*attrs)
public

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.