Sha256: 80f45e0bd8490d8ed7fbd9c7737df9713030ed2a46519116c918a2e94d1fd289
Contents?: true
Size: 542 Bytes
Versions: 1
Compression:
Stored size: 542 Bytes
Contents
ActiveRecord::Base.send(:include, Impressionist::Impressionable) module Impressionist module Impressionable extend ActiveSupport::Concern module ClassMethods def is_impressionable(options={}) define_association imp_cache_options_set(options) end def define_association has_many(:impressions, :as => :impressionable, :dependent => :destroy) end def imp_cache_options_set(options) @impressionist_cache_options = options end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
impressionist-1.4.0 | lib/impressionist/models/active_record/impressionist/impressionable.rb |