1

i have a module like this, where "partners_url" is a routing helper method

module A
    def B
    ....partners_url
    end
end

but i get this

NoMethodError - undefined method

How can i call that url helper in side a module?, thanks.

lumosnysm
  • 13
  • 4

1 Answers1

2

Put this line under your module declaration

include Rails.application.routes.url_helpers

Read about other options here

Thang
  • 811
  • 1
  • 5
  • 12