Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactored to reuse method

  • Loading branch information...
commit b88c96bd348d83c2d3479bddfbcd5ab6168bd9b3 1 parent 0721d3b
@anupamc anupamc authored
View
4 activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -25,7 +25,7 @@ def sql_type
end
def primary_key?
- type == :primary_key
+ type.to_sym == :primary_key
end
def to_sql
@@ -34,7 +34,7 @@ def to_sql
column_options[:null] = null unless null.nil?
column_options[:default] = default unless default.nil?
column_options[:column] = self
- add_column_options!(column_sql, column_options) unless type.to_sym == :primary_key
+ add_column_options!(column_sql, column_options) unless primary_key?
column_sql
end
Please sign in to comment.
Something went wrong with that request. Please try again.