Forum: Ruby on Rails Multiple views with same controller

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Mario P. (Guest)
on 2008-11-12 20:58
Hi there,

I want to truncate all the data from user model being edited in
different tabs (e.g. privacy data like newsletter receiving, login data,
user data, etc.), being convinient for the user.

First I wrote a controller for each section editing the same model. I
just don't think it's the best way, that's why I discarted it.

I'm taking care about the RESTfull resources, so of course, right now
it's called <%= link_to 'Edit member profile',
edit_user_path(logged_in_user) %>.

I have about 30 information to edit in the user model and want to let
thm edit separately. How do you do that? Any experience, any

Mario P. (Guest)
on 2008-11-12 21:20
What about adding different actions to it (e.g. privacy, account,

I do have that right now in routes:

map.resources :users, :member => { :enable => :put } do |users|
    users.resources :roles
    users.resources :photos, :name_prefix => 'user_', :controller =>
    users.resources :friends
    users.resources :gardens

means adding: { :enable => :put, :privacy => :get, :account => :get,
:userdata => :get }

and then I create a new view for the depending actions?

What about calling a GET? Isn't the update a PUT? Which of those to take
care about?

Being perfect the URL should look like
This topic is locked and can not be replied to.