Forum: Ruby on Rails Proper REST approach for 2 resources in same page

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.
13e4ba7f654dbbdd186d702c06c8b24c?d=identicon&s=25 Morten (Guest)
on 2006-12-28 16:58
(Received via mailing list)
Hi. I have 2 controllers UsersController and GroupsController. Each of
them RESTful.

For browsers, I wish to display users and groups data in the same HTML
page. This doesn't play well with REST, so I'm wondering what the best
approach is.

I could create a UsersAndGroupsController which renders the appropriate
templates, and when someone submits a write operation from the
interface, that would hit eg. the GroupsController, which would
format.html { redirect_to :controller => 'usersandgroups', :action =>
'index' } which would be somewhat DRY.

Anyone have ideas for other more elegant approaches?


This topic is locked and can not be replied to.