Sha256: 10a0832bfe8bb25ab4842113977bf36d31a8cde574e83458f055537fa83fe2a2

Contents?: true

Size: 149 Bytes

Versions: 16

Compression:

Stored size: 149 Bytes

Contents

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
shopify-money-0.14.1 lib/money_column/active_record_type.rb
shopify-money-0.14.0 lib/money_column/active_record_type.rb
shopify-money-0.13.1 lib/money_column/active_record_type.rb
shopify-money-0.13.0 lib/money_column/active_record_type.rb
shopify-money-0.12.0 lib/money_column/active_record_type.rb
shopify-money-0.11.9 lib/money_column/active_record_type.rb
shopify-money-0.11.8 lib/money_column/active_record_type.rb
shopify-money-0.11.7 lib/money_column/active_record_type.rb
shopify-money-0.11.6 lib/money_column/active_record_type.rb
shopify-money-0.11.5 lib/money_column/active_record_type.rb
shopify-money-0.11.4 lib/money_column/active_record_type.rb
shopify-money-0.11.3 lib/money_column/active_record_type.rb
shopify-money-0.11.2 lib/money_column/active_record_type.rb
shopify-money-0.11.1 lib/money_column/active_record_type.rb
shopify-money-0.11.0 lib/money_column/active_record_type.rb
shopify-money-0.10.0 lib/money_column/active_record_type.rb