Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save alexparker/4470673 to your computer and use it in GitHub Desktop.

Select an option

Save alexparker/4470673 to your computer and use it in GitHub Desktop.
acts_as_paranoid for has_many :through

I am using the acts_as_paranoid gem to manage soft deletion

Ah ok. I have an association that is

(in user.rb)
has_many :files, :through => :folders

and i am calling

user.files.select(...).where(...).group(...)

but I would like to do

user.files.with_deleted.select(...).where(...).group(...)
```

How can I get this working??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment