Module: IntegerInheritance::ColumnTypes
- Included in:
- ActiveRecord::ConnectionAdapters::TableDefinition
- Defined in:
- lib/integer-inheritance/column_types.rb
Instance Method Summary collapse
Instance Method Details
#inheritance_column(*args) ⇒ Object
6 7 8 9 10 |
# File 'lib/integer-inheritance/column_types.rb', line 6 def inheritance_column(*args) = { null: false, index: true, limit: 1, default: 1 }.merge!(args.) column_names = args.presence || [IntegerInheritance.default_column] column_names.each { |name| column(name, :integer, ) } end |