Class: ActiveRecord::ConnectionAdapters::TableDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/activerecord/connection_adapters/abstract/schema_definitions.rb

Instance Method Summary collapse

Instance Method Details

#column_with_comment(name, type, options = {}) ⇒ Object



18
19
20
21
22
23
# File 'lib/activerecord/connection_adapters/abstract/schema_definitions.rb', line 18

def column_with_comment(name, type, options = {})
  column_without_comment(name, type, options)
  column = self[name]
  column.comment = options.fetch(:comment){nil}
  self
end