Sha256: cf60f371da24f07a588bc813c7816135cf30a97cc5834a8677c4fd26bc21dd7b
Contents?: true
Size: 293 Bytes
Versions: 2
Compression:
Stored size: 293 Bytes
Contents
module Feeder class FeedableObserver < ActiveRecord::Observer observe Feeder.config.observables def after_create(feedable) Feeder::Item.create!( feedable: feedable, created_at: feedable.created_at, published_at: Time.zone.now ) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
feeder-0.3.0 | app/models/feeder/feedable_observer.rb |
feeder-0.2.0 | app/models/feeder/feedable_observer.rb |