Sha256: 1a1215ae1037b27849a35a51c4463bffdc2d48af0f7fe7679d7c5541fad48235

Contents?: true

Size: 324 Bytes

Versions: 5

Compression:

Stored size: 324 Bytes

Contents

module Comable
  class ShipmentMethod < ActiveRecord::Base
    validates :name, presence: true, length: { maximum: 255 }
    validates :fee, presence: true, numericality: { greater_than_or_equal_to: 0 }
    validates :traking_url, length: { maximum: 255 }

    scope :activated, -> { where(activated_flag: true) }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
comable-core-0.7.0.beta1 app/models/comable/shipment_method.rb
comable-core-0.6.0 app/models/comable/shipment_method.rb
comable_core-0.5.0 app/models/comable/shipment_method.rb
comable_core-0.4.2 app/models/comable/shipment_method.rb
comable_core-0.4.1 app/models/comable/shipment_method.rb