Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #9734 from choudhuryanupam/master

Method #primary_key? is not reused
  • Loading branch information...
commit ae8e84e976c296596adf97f60932bd3a164506b4 2 parents 1a90550 + b88c96b
@rafaelfranca rafaelfranca 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.