Permalink
Browse files

r2817@asus: jeremy | 2005-07-04 20:49:12 -0700

 active_record_store_test falls back to SQLite2 if 3 is unavailable
 r2818@asus:  jeremy | 2005-07-04 20:52:25 -0700
 update changelog


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1684 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent ddb57d8 commit 7bcaf2b6894078130ddfd6f855cb20d12f95dee5 @jeremy jeremy committed Jul 4, 2005
Showing with 9 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +7 −1 actionpack/test/controller/active_record_store_test.rb
@@ -1,5 +1,7 @@
*SVN*
+* The session class backing CGI::Session::ActiveRecordStore may be replaced with any class that duck-types with a subset of Active Record. See docs for details. #1238 [skaes@web.de]
+
* Fixed that hashes was not working properly when passed by GET to lighttpd #849 [Nicholas Seckar]
* Fixed assert_template nil will be true when no template was rendered #1565 [maceywj@telus.net]
@@ -14,7 +14,13 @@
require 'action_controller/session/active_record_store'
#ActiveRecord::Base.logger = Logger.new($stdout)
-CGI::Session::ActiveRecordStore::Session.establish_connection(:adapter => 'sqlite3', :dbfile => ':memory:')
+begin
+ CGI::Session::ActiveRecordStore::Session.establish_connection(:adapter => 'sqlite3', :dbfile => ':memory:')
+ CGI::Session::ActiveRecordStore::Session.connection
+rescue Object
+ $stderr.puts 'SQLite 3 unavailable; falling to SQLite 2.'
+ CGI::Session::ActiveRecordStore::Session.establish_connection(:adapter => 'sqlite', :dbfile => ':memory:')
+end
class ActiveRecordStoreTest < Test::Unit::TestCase

0 comments on commit 7bcaf2b

Please sign in to comment.