Sha256: c8323d175991913c422abd446e3c7d10ac159e9721ed91a53913afd670e2f789

Contents?: true

Size: 297 Bytes

Versions: 4

Compression:

Stored size: 297 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

4 entries across 4 versions & 1 rubygems

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