Sha256: 4c28f1593a56092cffdb3a1064a75a99e7c839dde8e8a5f0db04112e0b8f8695

Contents?: true

Size: 179 Bytes

Versions: 23

Compression:

Stored size: 179 Bytes

Contents

# frozen_string_literal: true
class MoneyColumn::ActiveRecordType < ActiveRecord::Type::Decimal
  def serialize(money)
    return nil unless money
    super(money.to_d)
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
shopify-money-3.0.0 lib/money_column/active_record_type.rb
shopify-money-2.2.2 lib/money_column/active_record_type.rb
shopify-money-2.2.1 lib/money_column/active_record_type.rb
shopify-money-2.2.0 lib/money_column/active_record_type.rb
shopify-money-2.0.0 lib/money_column/active_record_type.rb
shopify-money-1.3.0 lib/money_column/active_record_type.rb
shopify-money-1.2.1 lib/money_column/active_record_type.rb
shopify-money-1.2.0 lib/money_column/active_record_type.rb
shopify-money-1.1.2 lib/money_column/active_record_type.rb
shopify-money-1.1.1 lib/money_column/active_record_type.rb
shopify-money-1.1.0 lib/money_column/active_record_type.rb
shopify-money-1.0.2.pre lib/money_column/active_record_type.rb
shopify-money-1.0.1.pre lib/money_column/active_record_type.rb
shopify-money-1.0.0.pre lib/money_column/active_record_type.rb
shopify-money-0.16.0 lib/money_column/active_record_type.rb
shopify-money-0.15.0 lib/money_column/active_record_type.rb
shopify-money-0.14.8 lib/money_column/active_record_type.rb
shopify-money-0.14.7 lib/money_column/active_record_type.rb
shopify-money-0.14.6 lib/money_column/active_record_type.rb
shopify-money-0.14.5 lib/money_column/active_record_type.rb