Flowdock

Notes posted by odedniv

RSS feed
July 16, 2015
0 thanks

I would just use a validation instead of (the probably removed) :required

Just make sure you validate the presence of the association and not the foreign key, otherwise it will not work on new records.

The down side is that it will require the record in the cache, and will make a query otherwise. You can add `unless: :<foreign_key>?` If that’s a problem for you.