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

voter_type and votable_type are always base_class #77

Merged
merged 1 commit into from
May 14, 2014

Conversation

AlexanderPavlenko
Copy link
Contributor

If one voted for STI'ed model and then called liked? on it, it was always false, because Vote was implicitly saved with base_class in _type fields here https://github.com/ryanto/acts_as_votable/blob/master/lib/acts_as_votable/votable.rb#L87, but queried with the subclass condition.

…create, so any custom select should be casted too
ryanto added a commit that referenced this pull request May 14, 2014
voter_type and votable_type are always base_class
@ryanto ryanto merged commit e80edfa into ryanto:master May 14, 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.

2 participants