On Jan 9, 2014, at 9:54 AM, Robert Jewell wrote: > Hi All, > > I am trying to build a private message system on rails 4. I found a > great post here, > http://stackoverflow.com/questions/8405457/rails-threaded-private-messaging, > on stackover flow, but it is unclear to me what the tables should look > like. Does anyone have any suggestions with regards to building out the > tables? >
I strongly recommend that you use a free tutorial like the http://railstutorial.org by Michael Hartl to build a simple "starter" application first. Once you work all the way through that course you will have a strong and well-rounded idea of both how to answer this question, but how to solve others that will no doubt arise as you go. > Secondary question: Often when I Google this question, I see symbols or > strings that look like this: sender_uid or "receiver_uid" -- what is > _uid? I am familiar with, _id, when we are dropping a foreign key in a > table. Is appending, _uid, just another syntax for creating foreign keys > in tables? Does that mean there are, senders and receivers, tables? UID is an acronym for Unique ID. I think in the context of your project, that this means there is a single "users" table, and each user may be, at one time or another, a sender, receiver, or possibly both. Whether they are a sender or receiver means something specific in how you would render the message on screen (whose name goes on top, whose name goes on the bottom) but doesn't change the specific "user-ness" of each person. Walter > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/286222e2a96ec7bca78d4b13344726b0%40ruby-forum.com. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/B10AA799-9607-4550-ACE6-648ABAE68BC5%40wdstudio.com. For more options, visit https://groups.google.com/groups/opt_out.