Sha256: 8751439633509bcaeacbd9098c9c394ab6290111d5e4460853e18490bc78f3e9

Contents?: true

Size: 283 Bytes

Versions: 5

Compression:

Stored size: 283 Bytes

Contents

# frozen_string_literal: true

class PriceEstimate < ActiveRecord::Base
  include ActiveSupport::NumberHelper

  belongs_to :estimate_of, polymorphic: true
  belongs_to :thing, polymorphic: true

  validates_numericality_of :price

  def price
    number_to_currency super
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ibm_db-5.5.0 test/models/price_estimate.rb
ibm_db-5.4.1 test/models/price_estimate.rb
ibm_db-5.4.0 test/models/price_estimate.rb
ibm_db-5.3.2 test/models/price_estimate.rb
ibm_db-5.3.1 test/models/price_estimate.rb