aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/rails/generators
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-04-12 21:56:00 -0500
committerJoshua Peek <josh@joshpeek.com>2011-04-12 21:56:00 -0500
commited24595647374885cebc1d43badc174c0991e93a (patch)
tree020a8c856c264ed34deb872e54cf447e2fd872a3 /activerecord/lib/rails/generators
parentd7b521db1297c1b95a441b3928fc31ab3abd5ed5 (diff)
parentf0e198bfa1e3f9689e0cde1d194a44027fc90b3c (diff)
downloadrails-ed24595647374885cebc1d43badc174c0991e93a.tar.gz
rails-ed24595647374885cebc1d43badc174c0991e93a.tar.bz2
rails-ed24595647374885cebc1d43badc174c0991e93a.zip
Merge branch 'master' into sprockets
Diffstat (limited to 'activerecord/lib/rails/generators')
-rw-r--r--activerecord/lib/rails/generators/active_record/session_migration/session_migration_generator.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/rails/generators/active_record/session_migration/session_migration_generator.rb b/activerecord/lib/rails/generators/active_record/session_migration/session_migration_generator.rb
index afcda2a98a..d80c8ba996 100644
--- a/activerecord/lib/rails/generators/active_record/session_migration/session_migration_generator.rb
+++ b/activerecord/lib/rails/generators/active_record/session_migration/session_migration_generator.rb
@@ -1,4 +1,5 @@
require 'rails/generators/active_record'
+require 'active_support/core_ext/object/inclusion'
module ActiveRecord
module Generators
@@ -13,7 +14,7 @@ module ActiveRecord
def session_table_name
current_table_name = ActiveRecord::SessionStore::Session.table_name
- if ["sessions", "session"].include?(current_table_name)
+ if current_table_name.among?("sessions", "session")
current_table_name = (ActiveRecord::Base.pluralize_table_names ? 'session'.pluralize : 'session')
end
current_table_name