ConsultingMD / activerecord5-redshift-adapter

Other
45 stars 155 forks source link

Rails 5.2.0 replaced binds_from_relation with arel_from_relation #19

Closed robdimarco closed 6 years ago

robdimarco commented 6 years ago

In this ActiveRecord commit that was released with Rails 5.2.0, the method binds_from_relation was replaced with arel_from_relation.

This change breaks the Redshift adapter.

With this patch, we look to see if the new arel_from_relation method exists, and if so, we use that. Otherwise we fall back to the binds_from_relation method.

tmartyny commented 6 years ago

Hi @nfoen @aamine @RoryO,

Would you mind merging this?

Thank you!

RoryO commented 6 years ago

Done and pushed. Thanks.

tmartyny commented 6 years ago

Thanks!!