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

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -