lml / lev

Ride the rails but don't touch them.
MIT License
2 stars 6 forks source link

coerce attribute to always be a symbol #64

Closed nathanstitt closed 6 years ago

nathanstitt commented 6 years ago

json_api_client calls add with string attribute: https://github.com/JsonApiClient/json_api_client/blob/master/lib/json_api_client/resource.rb#L508

Looking at the source for active_model/errors they do quite a bit of work to call to_sym on everything which indicates that using string attributes is expected: https://github.com/rails/rails/blob/master/activemodel/lib/active_model/errors.rb#L295