RESTful rails customized resource mapping concerning edit action and monolithic template

Hi everyone, this is my first post.

I’m reorganizing a rails app to use RESTful routes. I have a users
controller that’s mapped RESTfully. Before the switch to REST I had
three separate actions to display a form to edit (on GET) and update
(on POST) personal info, email address, and password. While I’ve
managed to safely consolidate the update code for the three actions
into a single RESTful update action, I’m wondering what’s the easiest
way to do the following:


I know that I could add this in routes.rb:
map.connect ‘users/:id/edit/:what’, :controller => ‘users’, :action =>
and handle which template is rendered in the controller like so:
def edit
if params[:what] == ‘email’
# Render email template
elsif params[:what] == ‘password’
# Render password template
elsif params[:what] == ‘personal’
# Render personal template
# Render generic edit template

But let’s say for some completely arbitrary reason I want actions in
the users controller named email password and personal that respond to
the above routes. Is there any way to incorporate this mapping within

I tried something like:
map.resources :articles, :new => {:preview => :post}
but with :edit…
map.resources :users, :edit {:email => :get, :password
=> :get, :personal => :get}
and it doesn’t work. I can understand why the former works and the
latter doesn’t but was wondering if it is in fact possible to
configure the desired route within map.resources. Or do you think the
present solution is sufficient (in that it is good/adequate practice)?

Generally speaking, how would you go about coding a RESTful controller
where a monolithic edit action (or more precisely template) doesn’t
fit the bill?

Thanks for all of your help.