How can I make this MVC?
class Product < ActiveRecord::Base
validates :price, :presence => true
def to_s
"#{name} at #{number_to_currency(price)}"
end
end
I need to format price to a currency, but I can't use number_to_currency, because this is in the model. I could pass the view into this, but that doesn't feel very clean.