diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-02 09:03:56 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-02 09:03:56 +0000 |
commit | e21c48baf7a021a5c65004977f9359bc301aac9d (patch) | |
tree | 0afcadeab96892c7f96f730701c5dc41e73e26b2 /railties/lib/tasks | |
parent | 9def906fd05d120312223d0d9bc565cc2972f85a (diff) | |
download | rails-e21c48baf7a021a5c65004977f9359bc301aac9d.tar.gz rails-e21c48baf7a021a5c65004977f9359bc301aac9d.tar.bz2 rails-e21c48baf7a021a5c65004977f9359bc301aac9d.zip |
db:sessions:clear task uses session_table_name method. Closes #10631 [Cheah Chu Yeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r-- | railties/lib/tasks/databases.rake | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 80f16d7fa2..9162be8f30 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -331,9 +331,7 @@ namespace :db do desc "Clear the sessions table" task :clear => :environment do - session_table = 'session' - session_table = Inflector.pluralize(session_table) if ActiveRecord::Base.pluralize_table_names - ActiveRecord::Base.connection.execute "DELETE FROM #{session_table}" + ActiveRecord::Base.connection.execute "DELETE FROM #{session_table_name}" end end end |