mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge remote branch 'spastorino/master'
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
@@ -82,9 +82,9 @@ module ActiveRecord
|
||||
def create_table!
|
||||
connection.execute <<-end_sql
|
||||
CREATE TABLE #{table_name} (
|
||||
id INTEGER PRIMARY KEY,
|
||||
#{connection.quote_column_name(session_id_column)} TEXT UNIQUE,
|
||||
#{connection.quote_column_name(data_column_name)} TEXT(255)
|
||||
id #{connection.type_to_sql(:primary_key)},
|
||||
#{connection.quote_column_name(session_id_column)} VARCHAR(255) UNIQUE,
|
||||
#{connection.quote_column_name(data_column_name)} VARCHAR(255)
|
||||
)
|
||||
end_sql
|
||||
end
|
||||
@@ -219,8 +219,8 @@ module ActiveRecord
|
||||
def create_table!
|
||||
connection.execute <<-end_sql
|
||||
CREATE TABLE #{table_name} (
|
||||
id INTEGER PRIMARY KEY,
|
||||
#{connection.quote_column_name(session_id_column)} TEXT UNIQUE,
|
||||
id #{connection.type_to_sql(:primary_key)},
|
||||
#{connection.quote_column_name(session_id_column)} VARCHAR(255) UNIQUE,
|
||||
#{connection.quote_column_name(data_column)} TEXT
|
||||
)
|
||||
end_sql
|
||||
|
||||
@@ -11,9 +11,9 @@ module ActiveSupport
|
||||
end
|
||||
|
||||
def self.descendants(klass)
|
||||
@@direct_descendants[klass].inject([]) do |descendants, klass|
|
||||
descendants << klass
|
||||
descendants.concat klass.descendants
|
||||
@@direct_descendants[klass].inject([]) do |descendants, _klass|
|
||||
descendants << _klass
|
||||
descendants.concat _klass.descendants
|
||||
end
|
||||
end
|
||||
|
||||
@@ -40,4 +40,4 @@ module ActiveSupport
|
||||
DescendantsTracker.descendants(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user