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

Fix unread_by scope to work with associations #38

Closed
wants to merge 2 commits into from
Closed

Fix unread_by scope to work with associations #38

wants to merge 2 commits into from

Conversation

nazgum
Copy link

@nazgum nazgum commented May 13, 2014

In rails 4.1 Post.unread_by(user) works, but @site.posts.unread_by(user) does not,
as self refers to the association rather than the class, so read_mark_global is not found.

Using self.base_class fixes it up =)

In rails 4.1 Post.unread_by(user) works, but @site.posts.unread_by(user) does not,
as self refers to the association rather than the class.
@ledermann
Copy link
Owner

Great! Please, can you add a test to ensure this? The test should fail without your change...

@nazgum
Copy link
Author

nazgum commented May 13, 2014

Oops, seems I'm wrong here; sorry for that, I misunderstood why the global time stamp was not showing >_<

@nazgum nazgum closed this May 13, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants