# Multiple views with same controller

**URL:** <https://www.ruby-forum.com/t/multiple-views-with-same-controller/153158>\
**Category:** Rails\
**Created:** [November 12, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/multiple-views-with-same-controller/153158 "2008-11-12T19:58:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![panatura](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@panatura](https://www.ruby-forum.com/u/panatura)\
**Post date:** [November 12, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/multiple-views-with-same-controller/153158/1 "2008-11-12T19:58:49Z")

</div>

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  
suggestions?

Greetings  
Mayo

---

<div class="post-metadata">

**Author:** ![panatura](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@panatura](https://www.ruby-forum.com/u/panatura)\
**Post date:** [November 12, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/multiple-views-with-same-controller/153158/2 "2008-11-12T20:20:07Z")

</div>

What about adding different actions to it (e.g. privacy, account,  
userdata)?

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 =\>  
‘user\_photos’  
users.resources :friends  
users.resources :gardens  
end

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  
“[http://localhost:3000/users/7/privacy](http://localhost:3000/users/7/privacy)”
