Module: SimpleHelpers::ActionController

Defined in:
lib/simple_helpers/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#simple_helper(helpers_array) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/simple_helpers/action_controller.rb', line 3

def simple_helper(helpers_array)
  helpers_array.each do |name|
    name = name.to_s.underscore

    # method
    SimpleHelpers::Support.create_method(self, name)

    # helper
    ::ActionController::Base.helper_method name
  end
end