I tend to use observers for chain reactions (like creating models in
reaction to other actions, sending email or sms for certain actions,
etc), things that are kinda outside the model and big enough to
warrant separation.

On Dec 16, 9:33 pm, epoch <[email protected]> wrote:
> Hi guys, I'm kind of confused at when to use what. I understand if you
> want to decouple your models it's a good idea to use observers, but
> what is the best practise?
>
> For example if you want to create multiple models at once there is
> several ways to do this, you can do it within the controller, creating
> the models one after another, or you do it through call backs within
> the model itself through associations or what not, or you do it
> through observers.
>
> Any advice would be greatly appreciated, I'm going crazy thing about
> this.
>
> Cheers,
> Daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to