khiav223577 / deep_pluck

Allow you to pluck attributes from nested associations without loading a bunch of records.
MIT License
460 stars 14 forks source link

does'nt load translations #49

Closed blazetango closed 3 years ago

blazetango commented 3 years ago

I have a class with translations Questionnaire.deep_pluck(:title) returns

ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR: column "title" does not exist) title is translated field using globalise gem

khiav223577 commented 3 years ago

It seems that globalize override query methods of active_record https://github.com/globalize/globalize/issues/707, and automatically joins the translation's table.

I'll try and submit a PR to do the same thing when using deep_pluck together with globalize

khiav223577 commented 3 years ago

Just release v1.2.0.

See the CHANGELOG for more details