Flowdock
method

add_record_to_target_with_callbacks

Importance_0
v2.3.2 - Show latest stable - 0 notes - Class: ActiveRecord::Associations::AssociationCollection
add_record_to_target_with_callbacks(record) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/association_collection.rb, line 426
        def add_record_to_target_with_callbacks(record)
          callback(:before_add, record)
          yield(record) if block_given?
          @target ||= [] unless loaded?
          @target << record unless @reflection.options[:uniq] && @target.include?(record)
          callback(:after_add, record)
          record
        end
Register or log in to add new notes.