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

Issue with Rails5 #222

Closed
darnreich opened this issue Jan 15, 2016 · 4 comments
Closed

Issue with Rails5 #222

darnreich opened this issue Jan 15, 2016 · 4 comments

Comments

@darnreich
Copy link

Hello,
I am currently working on an app with Rails 5 (Beta1) and want to use Activerecord-import.
Unfortunately the execution comes to an exception in method values_sql_for_columns_and_attributes.
Here there is a check whether the Column objects responds to :type_cast_from_user, and if so it is used, if not, method :type_cast is called.
Unfortunately both those methods don't exist.
The column object is of class ActiveRecord::ConnectionAdapters::Column.

Is this a problem with activerecord-import and with Rails 5?

Thanks and regards!

zdennis added a commit that referenced this issue Jan 15, 2016
…e_cast_from_column to cast imported values.

[#222]
zdennis added a commit that referenced this issue Jan 15, 2016
…n_cache private.

It makes sense but we need them so we don't have to reload every instance from the DB (which is the public API for accessing this behavior).

[#222]
@zdennis
Copy link
Owner

zdennis commented Jan 15, 2016

Hey @darnreich, thanks for reporting this. It looks there are some removal/restructuring of code in ActiveRecord 5.0.0.beta1. I've started a changeset at #223 that resolves most of the test failures, but not all of them.

zdennis added a commit that referenced this issue Jan 15, 2016
…e_cast_from_column to cast imported values.

[#222]
zdennis added a commit that referenced this issue Jan 15, 2016
…n_cache private.

It makes sense but we need them so we don't have to reload every instance from the DB (which is the public API for accessing this behavior).

[#222]
zdennis added a commit that referenced this issue Jan 22, 2016
…e_cast_from_column to cast imported values.

[#222]
zdennis added a commit that referenced this issue Jan 22, 2016
…n_cache private.

It makes sense but we need them so we don't have to reload every instance from the DB (which is the public API for accessing this behavior).

[#222]
@zdennis
Copy link
Owner

zdennis commented Jan 22, 2016

@darnreich, I think PR #223 is just about ready. I'm planning on pushing a new release this afternoon that updates ar-import to work with ActiveRecord 5.0.

zdennis added a commit that referenced this issue Jan 23, 2016
@zdennis
Copy link
Owner

zdennis commented Jan 23, 2016

This was just released in activerecord-import 0.11.0 gem. The only adapter that currently won't work is em-synchrony since it is not AciveRecord 5.0.0 compatible yet.

@zdennis zdennis closed this as completed Jan 23, 2016
@darnreich
Copy link
Author

Thank you!

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