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

Undocumented breaking change (Cannot visit <Enum>) #53

Closed
bsedat opened this issue Jul 23, 2015 · 3 comments
Closed

Undocumented breaking change (Cannot visit <Enum>) #53

bsedat opened this issue Jul 23, 2015 · 3 comments

Comments

@bsedat
Copy link

bsedat commented Jul 23, 2015

I noticed that 963ac91 removed some visitor support and changed the specs. I upgraded to the 4.0 gem version and am seeing that lines similar to Dog.where(:breed => Breed.build('golden_retriever')) now error. I didn't see any mention of that change in the CHANGELOG, but maybe I'm missing something?

@beerlington
Copy link
Owner

@bsedat that's a good point, this should be added to the changelog since it was intentional and breaking. The reason I pulled it out was because the hacks required to make it work relied on some arel internals that were inconsistent between different versions of Active Record.

I would recommend converting the enum object to a string if possible instead of passing it directly to the query.

@bsedat
Copy link
Author

bsedat commented Jul 24, 2015

No worries, less hacks and more portability are awesome 😄. Thanks for your work on the gem!

@bsedat
Copy link
Author

bsedat commented Aug 12, 2015

👍 Thanks!

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