ruby on rails - How should I handle model attribute that doesn't match request params? -
I have such a model ...
receipt ------ - Amount: int # = & gt;
But in these views I have these fields ...
amount_dllter's amount_number
/ Pre>T work there.
What is the standard way to deal with this situation? Where do you put the code that converts incoming values to the amount of cents?
Add attr_accessors to zodiac_dollar and use first_service callback to update amount_cents amount.
Comments
Post a Comment