Sha256: e71afbfacd60e1fa4616fbcdbe53b27e6ba6b8d82016eefe6c8248cae0550fd9
Contents?: true
Size: 507 Bytes
Versions: 18
Compression:
Stored size: 507 Bytes
Contents
module Weighable module ActiveRecord module MigrationExtensions module Table def weighable(column) column "#{column}_value", :decimal, precision: 30, scale: 15 column "#{column}_unit", :integer, limit: 1 column "#{column}_display_unit", :integer, limit: 1 end def remove_weighable(column) remove "#{column}_value" remove "#{column}_unit" remove "#{column}_display_unit" end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems