Module: ActivityStream::BelongsToAssociation

Defined in:
lib/activity_stream.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/activity_stream.rb', line 137

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