Forum: Ruby on Rails Main controller

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
papipo (Guest)
on 2005-12-01 15:18
(Received via mailing list)
I have an application that has
app/controllers/admin/*some_controllers_here*/
Is it recommended to use the application controller as the main route to
public requests? If not, i can create a new "index" controller or
something,
buty i think that is not a good name. Which names do you usually use for
the
main entry point (controller) in the application?

Thanks,
Rodrigo.
francois (Guest)
on 2005-12-01 15:26
(Received via mailing list)
i've used 'welcome', 'front', 'main', 'site', 'public', 'blog' -
depending on the project
Pat M. (Guest)
on 2005-12-01 15:26
(Received via mailing list)
No, I don't think adding actions to the application controller is the
way to handle public requests.  If that were the case, what would be
the point of being able to create controllers at all, other than
separating an admin section?  As your site gets more complex, the
controller would just get huge, and eventually be responsible for much
more functionality than is manageable.

The easiest thing to do, in my mind, is logically separate your
controllers and then use routes to set the application entry point.
For example, if you're writing a blog, you might have a BlogController
and use routes so that http://yoursite.com looks to
BlogController#index.

Pat
This topic is locked and can not be replied to.