-
Notifications
You must be signed in to change notification settings - Fork 332
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
Overide Default_scope #161
Comments
That is a very good point. I'll include that in the new version! |
This is what I'm doing:
|
To also make it work if you need including PublicActivity::Activity.class_eval do
belongs_to :owner, -> { unscope(where: :deleted_at) }, polymorphic: true
end |
@Nemile's solution looks easy enough so I'll leave the codebase as-is and move it to a wiki page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have found that
@activity.trackable
does not work when there is adefault_scope
which excludes the tracked object. I found a working monkey patch (see below), though is there a more appropriate solution? Would it be possible to override this default_scope when it's present?The text was updated successfully, but these errors were encountered: