Where should the User's profile go?

0 views
Skip to first unread message

AlwaysCharging

unread,
Nov 11, 2009, 5:03:28 AM11/11/09
to Authlogic
I wanted to allow my users to have a simple profile page (pic, about
me, and maybe a list of some blog posts). Where would be the best
place to put it? Or, better yet, the recommended place to put it? In
a new model called Profile, which is then linked back to User? Or,
can (should) it go in the User model generated with Authlogic?

I'm sure either way will work; just was wondering the 'best' practice,
or the one that'll cause less fuss.

Lee Smith

unread,
Nov 18, 2009, 10:28:10 AM11/18/09
to Authlogic
Authlogic really has nothing to do with this but it makes sense to me
that the 'show' action of your UsersController be the "profile" for a
user.

Nicholas Young

unread,
Nov 18, 2009, 10:59:16 AM11/18/09
to auth...@googlegroups.com
I second Lee's suggestion. Here's what I would do, in detail:

First, get Norman Clarke's "Friendly_ID" gem, and install it in your rails app. (http://github.com/norman/friendly_id)

Second, add your username as the friendly_id column, (in your model: has_friendly_id :username).

Third, enjoy your new pretty profile links. (at /users/username)

Nicholas Young


--

You received this message because you are subscribed to the Google Groups "Authlogic" group.
To post to this group, send email to auth...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/authlogic?hl=.



Reply all
Reply to author
Forward
0 new messages