I have two isolated engines Offer and Prices .
How can I get the URL of the price movement controller in the Engine view using a hash with parameters?
#config/routes.rb Rails.application.routes.draw do mount Offers::Engine, at: "offers", as: "offers_routes" mount Prices::Engine, at: "prices", as: "prices_routes" end #offers/offers_controller.rb class Offers::OffersController def show end end #prices/prices_controller.rb class Prices::PricesController def index end end #views/offers/show.html.slim = link_to "Prices", { action:"index", controller:"prices/prices" }
In this case, link_to raises an error:
*** ActionController::RoutingError Exception: No route matches {:controller=>"prices/prices"}
I know about the offers_routes.offers_path , but in my situation I have to use a hash with parameters.
source share