Sha256: 5feee61ebd2d942234c8e2ca44d724881b617e3c7d83d415c27b73bd368422c3
Contents?: true
Size: 673 Bytes
Versions: 10
Compression:
Stored size: 673 Bytes
Contents
module MoneyRails module ActiveRecord module MigrationExtensions module Table def money(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_money(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
10 entries across 10 versions & 1 rubygems