Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
routing issue with mounted engine - Rails 3.2.8
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Erwin  
View profile  
 More options Oct 18 2012, 1:43 pm
From: Erwin <yves_duf...@mac.com>
Date: Thu, 18 Oct 2012 10:42:32 -0700 (PDT)
Local: Thurs, Oct 18 2012 1:42 pm
Subject: routing issue with mounted engine - Rails 3.2.8
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 ) , 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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Abdelkader Boudih  
View profile  
 More options Oct 19 2012, 4:48 am
From: Abdelkader Boudih <termin...@gmail.com>
Date: Fri, 19 Oct 2012 01:48:38 -0700 (PDT)
Local: Fri, Oct 19 2012 4:48 am
Subject: Re: routing issue with mounted engine - Rails 3.2.8

"rake routes" to see the routes.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »