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

Changeset 5618

Show
Ignore:
Timestamp:
11/23/06 05:16:46 (2 years ago)
Author:
david
Message:

Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/CHANGELOG

    r5614 r5618  
    11*SVN* 
     2 
     3* Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH] 
    24 
    35* Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [DHH] 
  • trunk/railties/lib/dispatcher.rb

    r5516 r5618  
    5656    # to restart the server (WEBrick, FastCGI, etc.). 
    5757    def reset_application! 
    58       ActiveRecord::Base.reset_subclasses if defined?(ActiveRecord) 
     58      if defined?(ActiveRecord) 
     59        ActiveRecord::Base.reset_subclasses 
     60        ActiveRecord::Base.clear_active_connections! 
     61      end 
     62 
    5963      Dependencies.clear 
    6064      ActiveSupport::Deprecation.silence do # TODO: Remove after 1.2