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

Adds max_on_assignment option. #16

Closed garethson closed 9 years ago

garethson commented 9 years ago

Give the option of limiting the value on assignment to our measured fields. Since we enforce the database field size on assignment anyway, providing the option to always limit the value will remove a lot of code in the consuming Shopify code base that has to default these values to the max size the field can handle.

@kmcphillips @cyprusad @trishume

cyprusad commented 9 years ago

Neato! check on assignment sounds like a better idea.. so much haxing in active_record :sparkles:

trishume commented 9 years ago

Looks good :+1: