Hi, all

In my rails app I have a controller called Dashboard::MenusController
with a namespace dashboard.
I have a model Company too, where its  has_many :menus

So, I have the code above in my route.rb

 map.namespace (:dashboard) do |dashboard|
  dashboard.resources :companies,
                :has_many => :menus
  end

With this route I can create a new menu by:  dashboard/companies/1/
menus/new

I would like to know, how can I hide the <companies/1> parameters,
becouse the company is gonna be logged in my apps, and my apps already
gets your ID from the session, instead of to get from URL

I would like to have: dashboard/menus/new


Above is my code for to take a ID of the company

 before_filter :load_company

 def load_company
        @company = Company.find(current_company.id)
 end


Thanks

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to