1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/price_estimate.rb

15 lines
283 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class PriceEstimate < ActiveRecord::Base
include ActiveSupport::NumberHelper
2016-08-06 13:37:57 -04:00
belongs_to :estimate_of, polymorphic: true
belongs_to :thing, polymorphic: true
validates_numericality_of :price
def price
number_to_currency super
end
end