1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #9734 from choudhuryanupam/master

Method #primary_key? is not reused
This commit is contained in:
Rafael Mendonça França 2013-03-15 12:12:56 -07:00
commit ae8e84e976

View file

@ -25,7 +25,7 @@ module ActiveRecord
end end
def primary_key? def primary_key?
type == :primary_key type.to_sym == :primary_key
end end
def to_sql def to_sql
@ -34,7 +34,7 @@ module ActiveRecord
column_options[:null] = null unless null.nil? column_options[:null] = null unless null.nil?
column_options[:default] = default unless default.nil? column_options[:default] = default unless default.nil?
column_options[:column] = self 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 column_sql
end end