DEV Community

Paweł Dąbrowski
Paweł Dąbrowski

Posted on

Call Rails helper method from another helper method

Since 4 version of Rails, helpers are loaded in the view so it is possible to call one helper method from another one without including helpers:

module ApplicationHelper
  def some_method_from_application_helper
    # do something
  end
end

module AnotherHelper
  def do_something
    some_method_from_application_helper # will work
  end
end

Thank you for reading! Follow me on Twitter to be up to date with the latest tips, articles, and videos about programming.

Top comments (0)