Skip to content
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

Define a scope on a relation #33

Open
Elyasin opened this issue Jul 11, 2015 · 1 comment
Open

Define a scope on a relation #33

Elyasin opened this issue Jul 11, 2015 · 1 comment

Comments

@Elyasin
Copy link

Elyasin commented Jul 11, 2015

Hi there, I was wondering whether and/or how it is possible to define a scope to include soft deleted objects in a relation. For example, inspired by ActiveRecord, I am looking for something like this:

has_and_belongs_to_many :users, -> { unscoped }

Would appreciate any help. Also, in case it is not possible or no viable workaround exists, I could maybe develope that feature myself. However, I will need guidance, I am not to proficient in Ruby yet.

Any helpers? Any takers?

@johnnyshields
Copy link
Collaborator

👍 I have this exact same problem and thinking of making a version of this gem which removes all default scopes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants