I know that I can use the db schema to easily generate CRUD for me. But I want to do a simple login page, it only using the "user" object, check whether the password & user name is correct. So, I want to create an "system" object which have a "login" method. How can I do that in RoR?
+1
A:
You can create a Controller and views without model and that will work. It looks like you want a super simple login which is described in this railscast. To see how to restrict access to pages, see the previous railscast
Chandra Patni
2009-12-27 05:34:30
Um... ..How can I do restriction on my application? I do restriction in the models before. But my system only have the controllers and view, where can I add the restrictions?
Ted Wong
2009-12-27 06:28:24
You can do restrictions on controller by via `before_filter`.
Chandra Patni
2009-12-27 06:44:20
I have updated the answer on how to add restrictions to other controllers.
Chandra Patni
2009-12-27 06:46:29