Hello!
I've got Gallery resource with namespaces: /gallery/galleries_controller.rb /gallery/albums_controller.rb /gallery/photos_controller.rb and models Gallery::Gallery, Gallery::Album and Gallery::Photo in my / models/gallery/ folder
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 resources :albums end end
And then i've trouble using, i.e.
@gallery = Gallery::Gallery.find(1); redirect_to(@gallery);
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!