[Rails] Re: Extending a model

2014-05-20 Thread Christophe N.
I'll take a look at that book and read on single table inheritance (STI). Thanks for your suggestions. I was also thinking about having a notification model and has N attributes. An attribute is a model that basically only have a type and value. Think that's a good idea? -- Posted via

[Rails] Extending a model

2014-05-18 Thread Christophe N.
I'm not sure what is the best approach for my problem. I need a model for notification (or alerts) in my application. Notifications are based on services, have multiple fields to define conditions and are associated with a user. Here's an example for a reddit notification: user_id: 1 type: