Rendering different view for different referrer for same action

9 views
Skip to first unread message

Samiron

unread,
Feb 16, 2010, 12:37:17 AM2/16/10
to Ruby on Rails: Talk, rubyonrails...@googlegroups.com
I was wondering about a design pattern. Let me give you a example.
Say, in a application there are users and three ways to see users.

1. User list
2. A single user description
3. User with his/her associated group (assume every user must belong
to one or more group)

Now everywhere I have a edit link to update the user's information.
Clicking the link will open a popup where I can change the information
and save. So at save action of users_controller, we need three kind of
rendering for above three referrers.

In these situations, what you guys do? is there any built-in support
in rails to handle these situations? or we need to put lots of
if..else in save.rjs file?
Thank you

Reply all
Reply to author
Forward
0 new messages