aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/session_store.rb10
-rw-r--r--activesupport/lib/active_support/descendants_tracker.rb8
2 files changed, 9 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/session_store.rb b/activerecord/lib/active_record/session_store.rb
index c6cf91c15d..365fcd6222 100644
--- a/activerecord/lib/active_record/session_store.rb
+++ b/activerecord/lib/active_record/session_store.rb
@@ -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
diff --git a/activesupport/lib/active_support/descendants_tracker.rb b/activesupport/lib/active_support/descendants_tracker.rb
index 6cba84d79e..4d1cfacc95 100644
--- a/activesupport/lib/active_support/descendants_tracker.rb
+++ b/activesupport/lib/active_support/descendants_tracker.rb
@@ -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 \ No newline at end of file
+end