Monday, January 3, 2011

[Rails] Re: Crazy routes

Finally, I used "traditional" namespace:

map.namespace :admin do |admin|
admin.resources :items
end

map.resources :items

And the nested generated routes (admin_items_path,...).

It works fine, but It's neccesary to change form_for(@item) to
form_for([:admin,@item) and link_to items_path to link_to
admin_items_path, ...

Thanks!

--
Posted via http://www.ruby-forum.com/.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate