Rails mountable engine under a dynamic scope

前端 未结 1 819
挽巷
挽巷 2021-01-07 07:42

say that I have these routes:

scope \'(:locale)\', :locale => /en|de/ do
  mount Users::Engine => \"users\", as: \'users_engine\'  
end
1条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-07 08:14

    I think I have found a solution for that...

    Just use the url_options-method in your application_controller.rb-File (see link below)

    See: https://stackoverflow.com/a/18299975/603126

    Hope it helps!

    Regards

    Philipp

    0 讨论(0)
提交回复
热议问题