views:

278

answers:

1

I'm new to rails, and even more new to devise.

I have set up a user controller and I've managed to create a view showing the e-mail address of the current user. Now I want a user profile page, where the user can add personal information etc, and keep track of published posts etc. Basic community functions.

How should I design this? Should I create another controller and model, like userprofile? I already have a controller called users, created by devise. Can I reuse that or should I create a new one?

I would love some examples in order to get the idea. I'm still a little confused with the concepts used of rails.

+1  A: 

Your controller should be named UsersController, just to be sure. The model class will be named User, and the table on the database users.

If you do the normal creation of a RESTfull controller, it will have the actions index, new, show, and delete. That maps pretty well to what a user will want to do. The only thing you have to think about is if all users should have the right to see all information stored in the profile for a user, but that won't change if your model will be userprofile.

mliebelt