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

Replace type_cast_from_column to lookup_cast_type_from_column. #64

Closed
wants to merge 1 commit into from

Conversation

huacnlee
Copy link
Contributor

@huacnlee huacnlee commented Sep 28, 2020

In Rails 6.1 type_cast_from_column API has been removed:

rails/rails#39106

lookup_cast_type_from_column was exists in Rails 5.0

In Rails 6.1 type_cast_from_column API has been removed:
rails/rails#39106

lookup_cast_type_from_column was exists in Rails 5.0
Copy link
Collaborator

@mberlanda mberlanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I did not see this PR coming earlier. Is it still actual? in case, would you mind to rebase it and publish a new revision? thank you very much for your time and your contribution

Comment on lines +83 to +85
@before_save_callback&.call(@set)
execute_query
@after_save_callback.() if @after_save_callback
@after_save_callback&.call
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would break the compatibility with ruby 2.2

Comment on lines +110 to +113
if column
# https://github.com/rails/rails/commit/cfa5aa7977c4c3c8e318df196d4dea54fb6b8802
type = @connection.lookup_cast_type_from_column(column)
value = type.serialize(value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to have been covered by #64

@huacnlee huacnlee closed this Oct 18, 2021
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