views:

38

answers:

0

Hi,

I am building a social network from the ground up in rails and I am wanting to set up a face-book style notification system for displaying new messages, friend requests, etc... in a visual appealing and UI friendly manner. What's the best way to go about this? I am thinking of using acts_as_state_machine but it seems a bit out of date.

Thanks!

Edit:

I've been working on another feature of the app but I am now coming back to this. The only response to this question (workflow) is not working on my app for some reason. Nor are any of the other state machine gems (AASM, transitions, state_machine). This may be due to incompatability issues with rails 2.3.9?

Either way I am just looking to make this very simple; when a new message is created it has the state of "unread"...when the user goes to the show page for that specific message a after_filter changes the state to "read"...since none of these previously mentioned state machine gems are working would it just be easier to create another column (state) in my "message" model and update "unread" to "read" from there? Or is there a better way to do this?

I've implemented an activity stream for this app, which, was taken from this answer, i was thinking I could create a "notifications" database that is triggered whenever a new event involving current_user is created. Is this a bad idea?