DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 964,423 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
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)

Google Cloud Superstar

Use your favorite Google Cloud APIs with MongoDB Atlas to build a highly-scalable modern application for your entry in the DEV x MongoDB Atlas Hackathon 2022.

β†’ Get Started