Sha256: 27ea821a912552b1211bc06f34209b0745add8256727fade1bd837269ec7e431
Contents?: true
Size: 653 Bytes
Versions: 3
Compression:
Stored size: 653 Bytes
Contents
# == Schema Information # # Table name: purchases # # id :integer not null, primary key # paid :boolean # commission :decimal(, ) # quantity :integer # state :string # expired_at :datetime # amount :decimal(, ) # description :text # created_at :datetime not null # updated_at :datetime not null # class Purchase < ActiveRecord::Base extend Enumerize STATES = %i{pending canceled finished} enumerize :state, in: STATES, default: :pending humanize_attributes humanize :state, enumerize: true humanize :commission, percentage: true humanize :amount, currency: true end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
human_attributes-0.2.0 | spec/dummy/app/models/purchase.rb |
human_attributes-0.1.1 | spec/dummy/app/models/purchase.rb |
human_attributes-0.1.0 | spec/dummy/app/models/purchase.rb |