ordinary routes in main layout don't work when navigating to mounted engine path

21 views
Skip to first unread message

fugee ohu

unread,
Jan 24, 2018, 4:25:27 AM1/24/18
to Ruby on Rails: Talk
I installed a gem (blogit) so in my routes I mount it with   mount Blogit::Engine => "/blog"  but then all the regular routes in my main layout stop working with messages like undefined local variable or method `new_user_session_path' for #<#<Class:0x000000053d63f0>:0x007f96d1235a40>
Thanks for reading and in advance if you can help

Walter Lee Davis

unread,
Jan 24, 2018, 9:06:00 AM1/24/18
to rubyonra...@googlegroups.com
I have had some experience with this, and this page has a good bit of detail around the `isolate_namespace` method: http://guides.rubyonrails.org/engines.html

Walter

> On Jan 24, 2018, at 4:25 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> I installed a gem (blogit) so in my routes I mount it with mount Blogit::Engine => "/blog" but then all the regular routes in my main layout stop working with messages like undefined local variable or method `new_user_session_path' for #<#<Class:0x000000053d63f0>:0x007f96d1235a40>
> Thanks for reading and in advance if you can help
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d47f00f8-add6-42ec-9c74-a7dd99df6c47%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

fugee ohu

unread,
Jan 24, 2018, 3:39:27 PM1/24/18
to Ruby on Rails: Talk
Thanks Walter 
Reply all
Reply to author
Forward
0 new messages