You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
It's not supported. I'm using monkey patch below to achieve desired behavior:
def self.paranoid_default_scope_sql
self.scoped.table[paranoid_column].eq(false).to_sql
end
def self.only_deleted
without_paranoid_default_scope.where("#{paranoid_column_reference}" => true)
end
I don't think it's good though (recovery probably would fail but I'm not using it yet). Could you add support for boolean columns with true/false values?
Hi,
I noticed that you have the following lines:
default_scope where("#{paranoid_column_reference} IS ?", nil) # Magic!
and
def only_deleted
self.unscoped.where("#{paranoid_column_reference} IS NOT ?", nil)
end
This would work ok for relatively smaller table, but not a huge one, where I would add index for is_deleted field.
Could you please add the support for is_deleted field and assuming the default to be set to false rather than NULL?
Thanks
-lei
The text was updated successfully, but these errors were encountered: