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

Fix LogSubscriber to allow legacy binds #28526

Merged

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Mar 22, 2017

Follow up of #27939.

r? @rafaelfranca

@kamipo kamipo force-pushed the fix_log_subscriber_to_allow_legacy_binds branch from f72a168 to 258842c Compare March 22, 2017 16:43
@@ -44,17 +44,17 @@ def sql(event)
private

def type_casted_binds(binds, casted_binds)
casted_binds || binds.map { |attr| type_cast attr.value_for_database }
casted_binds || ActiveRecord::Base.connection.send(:type_casted_binds, binds)
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this method public but private API? We prefer to avoid using send inside the framework.

@kamipo kamipo force-pushed the fix_log_subscriber_to_allow_legacy_binds branch from 258842c to 53f8716 Compare March 22, 2017 18:09
else
binds.map { |attr| type_cast(attr.value_for_database) }
end
def type_casted_binds(binds) # :nodoc:
Copy link
Member Author

Choose a reason for hiding this comment

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

I made this method to public.

@rafaelfranca
Copy link
Member

Backported in a59d0ee

rafaelfranca added a commit that referenced this pull request Mar 22, 2017
…acy_binds

Fix `LogSubscriber` to allow legacy `binds`
@kamipo kamipo deleted the fix_log_subscriber_to_allow_legacy_binds branch March 23, 2017 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants