Module: SchemaComments::ConnectionAdapters::TableDefinition

Defined in:
lib/schema_comments/connection_adapters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commentObject

Returns the value of attribute comment.



10
11
12
# File 'lib/schema_comments/connection_adapters.rb', line 10

def comment
  @comment
end

Instance Method Details

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



12
13
14
15
16
17
# File 'lib/schema_comments/connection_adapters.rb', line 12

def column(name, type, options = {})
  result = super(name, type, options)
  column = self[name]
  column.comment = options[:comment]
  result
end