On Thursday, June 21, 2012 7:02:56 AM UTC-7, Iain Barnett wrote: > > So I need to use super with the _add_association method too? (I didn't > find an example of this in the docs except with before/after hooks, sorry > if it's somewhere obvious) >
It depends. You want to call super anytime you want to run the default behavior. If for some reason you want different behavior, you may not want to call super. Assuming you only want to find_or_create the associated object, but don't need to change how it is associated to the current object after being found or created (i.e. a simple entry into the join table will suffice), you may not even need to override _add_association at all. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/YxOBgeL1UHsJ. 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/sequel-talk?hl=en.
