Shopify / measured-rails

Rails adapter for the measured gem. Encapsulate measurements and their units in Ruby and Rails.
MIT License
92 stars 13 forks source link

Allow custom value accessors with validations #70

Closed edbrown23 closed 2 years ago

edbrown23 commented 2 years ago

This just copies the functionality already available for custom unit accessors. Seems like just an oversight that it wasn't included for value accessors

edbrown23 commented 2 years ago

I assume this will need a changelog entry and a version update, etc, but wanted to get the initial review in

edbrown23 commented 2 years ago

@kmcphillips any thoughts on the above?

kmcphillips commented 2 years ago

Hi yes, this is totally legit. I'm not sure why this was different for both _field and _value but there's no reason to be.

Sorry for the slow response. I am on parental leave.

kmcphillips commented 2 years ago

I'll poke some people who are not on parental leave to see if I can get someone to bump and release both measured and measured-rails (they are version locked together). But if this is urgent I suggest you use the github SHA for now.