-1

How can i generate url for named match route:

match '/confirm_email' => 'landing_controller#index', :as => 'frontend_confirm_url', via: [:get]

using something like this:

  • <%= link_to 'frontend_confirm_url', frontend_confirm_url_url %>
  • Rails.application.routes.frontend_confirm_url_url

doesn't work, maybe because i'm using Spree as an engine, and trying to resolve paths from it's mailer?

kaz
  • 1,943
  • 1
  • 13
  • 19

1 Answers1

0

OK, I figured out, you need to use:

<%= link_to 'frontend_confirm_url', main_app.frontend_confirm_url_url %>

kaz
  • 1,943
  • 1
  • 13
  • 19