Class: ActiveRecord::ConnectionAdapters::ColumnDefinition
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::ColumnDefinition
- Defined in:
- lib/activerecord/connection_adapters/abstract/schema_definitions.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
Instance Method Summary collapse
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
6 7 8 |
# File 'lib/activerecord/connection_adapters/abstract/schema_definitions.rb', line 6 def comment @comment end |
Instance Method Details
#to_sql_with_comment ⇒ Object
8 9 10 11 12 13 |
# File 'lib/activerecord/connection_adapters/abstract/schema_definitions.rb', line 8 def to_sql_with_comment column_sql = to_sql_without_comment return column_sql if comment.nil? "#{column_sql} COMMENT '#{base.quote_string(comment)}'" end |