"rake routes" to see the routes. On Thursday, 18 October 2012 17:43:12 UTC, Erwin wrote: > > I mounted the Forem::Engine in my app > > MyApp::Application.routes.draw do > scope "/:locale" do > ... > resources :sites, :only => [:none] do > get 'home', :on => :collection > get 'events', :on => :collection > end > .. > mount Forem::Engine, :at => "/forums", :as => :forums, > constraints: lambda { |r| r.subdomain.present? && r.subdomain != > 'www' } , :defaults => { :locale => I18n.locale } > ... > end > > when I display the home page of the subdomain, http://bingo.lvh.me:3000/ > I don't have any problem with the navbar links in the header > in which I have : > = link_to t(:home), home_sites_path(:locale => I18n.locale) > = link_to t(:forums), forums_path(:locale => I18n.locale) > > Upon clicking on 'forums' item ( generated url: bingo.lvh.me:3000/ > en/forums <http://bingo.lvh.me:3000/en/forums> ) , I am redirected > correctly to the engine > Forem::forums#index, the rendering raises an error with the home > link ... > > undefined method `home_sites_path' for #<#<Class:0x007fdd936ce5f8>: > 0x007fdd96db7e70> > it seems that my app routing is lost > > despite the fact that I get the route in my routes.rb, but maybe > 'forums_path' is not the right > > what could be wrong ? thanks for feedback > >
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/NGyVUioTeuMJ. For more options, visit https://groups.google.com/groups/opt_out.