Sha256: 946a80a5426484325902ea7cc7847ed5e67516f58eadb763571701ef277933a9
Contents?: true
Size: 680 Bytes
Versions: 15
Compression:
Stored size: 680 Bytes
Contents
module MoneyRails module ActiveRecord module MigrationExtensions module Table def monetize(accessor, options={}) [:amount, :currency].each do |attribute| column_present, _, *opts = OptionsExtractor.extract attribute, :no_table, accessor, options column(*opts) if column_present end end def remove_monetize(accessor, options={}) [:amount, :currency].each do |attribute| column_present, _, column_name, _, _ = OptionsExtractor.extract attribute, :no_table, accessor, options remove column_name if column_present end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems