Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8522

Show
Ignore:
Timestamp:
01/02/08 09:03:56 (5 months ago)
Author:
bitsweat
Message:

db:sessions:clear task uses session_table_name method. Closes #10631 [Cheah Chu Yeow]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/lib/tasks/databases.rake

    r8519 r8522  
    332332    desc "Clear the sessions table" 
    333333    task :clear => :environment do 
    334       session_table = 'session' 
    335       session_table = Inflector.pluralize(session_table) if ActiveRecord::Base.pluralize_table_names 
    336       ActiveRecord::Base.connection.execute "DELETE FROM #{session_table}" 
     334      ActiveRecord::Base.connection.execute "DELETE FROM #{session_table_name}" 
    337335    end 
    338336  end