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

AR.each_instance doesn't work and permit access to instance fields #8

Closed
RaVbaker opened this issue May 14, 2014 · 4 comments
Closed

Comments

@RaVbaker
Copy link
Contributor

It's related to this problem from Rails: rails/rails#15107

Because of the row.symbolize_keys line ( #61 ) instantiate from line #173 is not properly assigning attributes.

I will write a tests and temporary fix for it. At least until it's not fixed in Rails 4.

@afair
Copy link
Owner

afair commented May 14, 2014

@RaVbaker thanks! I was up late last night chasing that down, and suspected it may be an issue with ActiveRecord ~ 4.1, and was trying to pinpoint the release with the regression.

Chasing internal ActiveRecord API changes is tough for all these plugins trying to add enhanced features. Lately, I've been trying to find a sharding library that works with 4.1, and most have fallen behind and aren't even supporting 4.0 yet. I know their pain. :-)

@RaVbaker
Copy link
Contributor Author

I'm coding a fix for it now. It will be with a bit of refactor of the gem.

@RaVbaker
Copy link
Contributor Author

RaVbaker added a commit to RaVbaker/postgresql_cursor that referenced this issue May 14, 2014
RaVbaker added a commit to RaVbaker/postgresql_cursor that referenced this issue May 14, 2014
@afair
Copy link
Owner

afair commented Jun 10, 2014

@RaVbaker Thanks for the good work there. Unfortunately, I felt the library needed a bigger refactor to support these features. The v0.5 branch now works with Rails 3.2 through Edge (4.2?) Since I wrote this 6 years ago, Rails has evolved a lot, and each minor release brings breaking changes. I hope this new structure better integrates into the upcoming versions of Rails (including Aaron's "Adequate Record"). I looked at your code here for ideas, so it has been very useful!

@afair afair closed this as completed Jun 10, 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

No branches or pull requests

2 participants