Friday, June 6, 2008

Andrzej's Rails tips #10

form_for and namespace route

When you use a namespace route like the following:


map.namespace :admin do |a|
a.resources :users
end


then if you want to use form_for @user, this is the correct way:

<% form_for([:admin, @user]) do |f| %>

No comments: