I have dilema with storing percentage values in database. I have model "Cost" in my database. It will belong to Vat. My Vat model will have only one field: "rate". And now my problem is which type of data use. I want to store for my Vat object values something like that:
Any ideas?
why not just store it as float and add methods in the vat model
def rate
self.rate * 100
end
def rate=(perc)
self.rate = perc / 100
end