method
delete
v4.2.7 -
Show latest stable
- Class:
ActiveRecord::Associations::HasOneAssociation
delete(method = options[:dependent])public
No documentation available.
# File activerecord/lib/active_record/associations/has_one_association.rb, line 53
def delete(method = options[:dependent])
if load_target
case method
when :delete
target.delete
when :destroy
target.destroy
when :nullify
target.update_columns(reflection.foreign_key => nil)
end
end
end