Module: ActivityStream::BelongsToPolymorphicAssociation

Defined in:
lib/activity_stream.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/activity_stream.rb', line 206

def self.included(base)
  base.class_eval do
    def replace_with_indirect_object(record)
      tag_with_indirect_object record
      replace_without_indirect_object record
    end
    alias_method_chain :replace, :indirect_object
    
    def find_target_with_indirect_object
      record = find_target_without_indirect_object
      tag_with_indirect_object record
      record
    end
    alias_method_chain :find_target, :indirect_object
  end
end