Sha256: fb6635b2f2783a7e0b0aafc06a494309e475929b374a8b491914c92fd2d219fa
Contents?: true
Size: 448 Bytes
Versions: 10
Compression:
Stored size: 448 Bytes
Contents
class VendorObserver < ActiveRecord::Observer observe :vendor # # On create, new VendorDetail joins are created for each existing member # def after_create(record) VendorMember.add_vendor_proxy(record.vendor_proxies) end # # On updates, all members are touched, ensuring that widget JSON requests # for the members are pulling the most recent information # def after_update(record) VendorMember.touch_all end end
Version data entries
10 entries across 10 versions & 1 rubygems