views:

62

answers:

1

Say I want to render a page that isn't necessarily tied to a model. Up until now I have been creating a controller titled, "Pages", and a route for each page:

map.home :controller => "pages", :action => "home"

This isn't restful and it is tedious. Surely there is a better way to handle "perspectives" such as this?

Note: I avoid the term "view" in order to distinguish between Rails views and what I wish to accomplish.

Thanks.

+3  A: 

There are a few ways to handle this. Josh Susser wrote a post about it, and there is a Railscast on a similar topic.

In short, there isn't a great way to handle it, but there is some room for improvements over the way you're doing it now.

HTH

Tim Sullivan
Tim, this is fantastic. I really like Josh's solution. Thank you.
Tricon