dependent-destroy Questions

1

Solved

I'm trying to decide how best to set up (if at all) foreign key constraints for my rails application. I have a model Response that belongs_to a Prompt. I would like to use :dependent => :destroy...
Unfaithful asked 15/2, 2016 at 15:51

6

Solved

Pretty sure these tests are working correctly. Got them to fail by removing the dependent: :destroy options on the has_many :relationships and has_many :reverse_relationships in user.rb. Wanted to ...

1

Solved

in Ruby on Rails 4, let's say a parent has many children. When the parent is deleted, the children must also be deleted. Other than that, the child shall not be deleted unless it is an orphan. How ...

1

Solved

I've built a Rail 3 AuditLog with the help of a few plugins, that store data in an AuditLog Table with the following fields for identification (feeded_id, feeded_type) So in my case, I have a phot...
Commoner asked 1/11, 2010 at 20:50

2

Solved

Through many iterations of testing, I just noticed that my join table that represents a HABTM relationship between two models isn't removing entries when instances of these models get deleted. Do I...
1

© 2022 - 2024 — McMap. All rights reserved.