Forum: Ruby on Rails inbox addon for app

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
760e5c90000057a6860986b69b77c400?d=identicon&s=25 John Griffiths (indiehead)
on 2007-07-31 12:36
Hi, i'm trying to write a sort-of inbox feature for my app.

having a 'inbox' & 'sent items' area for each logged in user so they can
send and receive messages to people logged into the system.

i'm thinking the data model would be something like...


something like that,

the state (not read, read, sent) would determine what box it should sit
in, sort of like a blog / list model to connect each message together
like a line of history.


any thoughts?
Cb98c59a6ff22c72676e756bbd28f266?d=identicon&s=25 Jacob Atzen (Guest)
on 2007-07-31 12:48
(Received via mailing list)
John Griffiths wrote:
> created_at
> any thoughts?
I seem to vaugely recall someone writing about a plugin doing that kind
of thing. Maybe you can save yourself a bit of time browsing the plugin
lists at:

And maybe me memory is corrupted and you should just go ahead and do it
yourself. It sounds like a pretty easy task ;-)

- Jacob Atzen
821395fe70906c8290df7f18ac4ac6cf?d=identicon&s=25 Rick Olson (Guest)
on 2007-07-31 16:59
(Received via mailing list)
On 7/31/07, John Griffiths <> wrote:
> user_id
> any thoughts?

You may want sender/receiver fields too.

Rick Olson
760e5c90000057a6860986b69b77c400?d=identicon&s=25 John Griffiths (indiehead)
on 2007-07-31 18:08
Thanks Rick, yep suppose I would, haven't fully worked out then data
model for this.

as a sidenote,

how do you write listboxes and checkboxes elements into the ruby forms?
Cd804cfeeea508f6bf2f5487c9ef4aed?d=identicon&s=25 linoj (Guest)
on 2007-07-31 20:17
(Received via mailing list)
I'd probably add an Inbox model that belongs_to messages with a column
for the user_id and read_state
Then do a current_user.inbox.messages for your index find, and use
group_by in the view to divide them up by state.
This way a message can be 'delivered' to multiple people with
different states. A user deleteing a message removes it from his
inbox. Then periodically purge all orphaned messages... (just thinking
out loud here)


On Jul 31, 6:36 am, John Griffiths <>
This topic is locked and can not be replied to.