Matt Jones
2009-May-15 17:17 UTC
Re: Modeling an internal messaging system, how would you do?
I''ve used the restful_ezm plugin with good results - the message model may be a little simplistic for some scenarios, but it works well most of the time. I''ve forked it and fixed a few issues (not correctly escaping boolean values in DB conditions, for instance) at: github.com/al2o3cr/restful_ezm/tree/master It may be overkill for your app, as it also generates a default MessagesController, but could be of some inspiration. --Matt Jones On May 14, 9:55 am, ms <m...-cGBD8117FJM@public.gmane.org> wrote:> Hey, > > on my site, I''ve got an internal messaging system. A message can be > saved, sender and recipient are saved as properties. Then, also one > status number is saved, which indicates whether the message is sent/ > read/deleted either on the sender side or on the recipient side. As I > relaunch the system, the question came to my mind, if I should it > model another way. For example, I could associate the User and Message > model over a intermediate model, where for example, I could save some > more data, which refers directly to the relation. A message could then > also have multiple recipient, for example, if I model the intermediate > table 1:m. > > There are many ways to do this, I think. > > I just wanted to ask, how do you model this and why in this specific > way? > > Thank you very much, > ms