i18n_alchemy icon indicating copy to clipboard operation
i18n_alchemy copied to clipboard

Bugfix: association_parser

Open michaelrigart opened this issue 3 years ago • 0 comments

In PR #44 the requrest is to cast the AC::Parameters to a hash. This is not needed, since AC::Parameters has a values call that delegates it to the @parameters variable. The variable is a ActiveSupport::HashWithIndifferentAccess, which has a values method. So the only thing that needs to be done is extend the conditional to check if the attributes variable is AC::Parameters object.

Another option would be to change the conditional to see of the attributes objec respond_to?(:values)

michaelrigart avatar Jun 22 '21 16:06 michaelrigart