You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm trying to use apotomo from a mountable engine (with namespace in modules and routes) but i'm having some problems doing it. The apotomo gem is mounted on the main project and i'm using it from the engine. When i try to use the helper url_for_event from outside a widget inside the engine, it crashes. It raises the next error:
Same issue (apotomo_event_path inside isolated engine)
About main_app route: match ":controller/render_event_response" ... :as => "apotomo_event"
Inside engine, apotomo_event_path builds "engine_mount_point/engine_namespace/controller_name..etc"
We have namespaced controller.
I tried to put the same route to Engine.routes and add 'use_route' param, but it's not possible because ":controller segment is not allowed within a namespace block"
Rails route knows the namespace of controller after the engine mount pont, so it must work if engine's namespace is omitted from Widget.controller_path.. hmm I'll try
A working fix is to override apotomo_event_path for widget inside engine
def apotomo_event_path(options = {})
Rails.application.class.routes.url_helpers.apotomo_event_path(options)
end
but there must be a better solution
Hi, i'm trying to use apotomo from a mountable engine (with namespace in modules and routes) but i'm having some problems doing it. The apotomo gem is mounted on the main project and i'm using it from the engine. When i try to use the helper url_for_event from outside a widget inside the engine, it crashes. It raises the next error:
Here GrooveVideoChat is the engine, inside it has the controller for sessions , sessions controller inside has:
And the view for the action new session calls url for event, here is the code:
url_for _event works inside the widget itself, however i have to make certain tweak. Remove the namespacing in the route.
/video_chat appears because the engine is mounted in the main app as follows.
Thanks in advance
The text was updated successfully, but these errors were encountered: