-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discard record on has_many through #43
Comments
Also, along the same lines, how can I get a list of kept vehicles including only kept parts? # This only returns a list of kept vehicles,
# some of the included parts might have already been discarded
# as the `kept` scope only applies to the vehicles table
Vehicle.includes(:parts).kept |
You can call the scope on parts later in your script, so suppose you want all kept parts:
|
@lostie If you want to discard the part for the vehicle without discarding the part itself, you'd include |
If you have the following relations:
How would
discard
be configured? Would all the table have adiscarded_at
column? And how are we expected to discard apart
for a givenvehicle
, not the part itself?Without any soft delete tool, I would be doing something like this:
The text was updated successfully, but these errors were encountered: