Merge remote branch 'spastorino/master'

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
José Valim
2010-07-22 21:45:48 +02:00
2 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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