I've got Gallery resource with namespaces:
and models Gallery::Gallery, Gallery::Album and Gallery::Photo in my /
I want my Gallery work like standart resource: site.com/galleries/2/
albums/3, but being incapsulated in own folders, so i write in
routes.rb this rules:
scope :module => "gallery" do
resources :galleries do
And then i've trouble using, i.e.
@gallery = Gallery::Gallery.find(1);
undefined method `gallery_gallery_url'
-- but why `gallery_gallery_url' when i expect just `gallery_url' like
it is in "rake routes"?
next time i write
<% @gallery = Gallery::Gallery.find(1); %>
<%= form_for @gallery do |f| %>
undefined method `gallery_galleries_path'
-- i need to manualy add :url option:
<%= form_for @gallery, :url => galleries_path do |f| %>
What's wrong? What i have to do with this issue?
Thanks for any help!