You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ActiveRecord models include the attribute_names method, which, as the name suggests, lists all the attributes the model exposes. As it turns out, ParamsWrapper uses the result of this method to determine which attributes to wrap. Since it just uses column names by default, the column itself will be wrapped (e.g. gender_cd) but not the enum attribute (e.g. gender).
It would be nice if simple_enum extended this list to include the enum attribute name so that ParamsWrapper automagically works with models that include enums.
The text was updated successfully, but these errors were encountered:
ActiveRecord models include the
attribute_names
method, which, as the name suggests, lists all the attributes the model exposes. As it turns out,ParamsWrapper
uses the result of this method to determine which attributes to wrap. Since it just uses column names by default, the column itself will be wrapped (e.g.gender_cd
) but not the enum attribute (e.g.gender
).It would be nice if simple_enum extended this list to include the enum attribute name so that
ParamsWrapper
automagically works with models that include enums.The text was updated successfully, but these errors were encountered: