Browse files

Change DbCharmer.connections_should_exist default value to true

  • Loading branch information...
1 parent bce2d2e commit e5b5f2ca764ed3e07a711a5d88ec2822be8a237e @kovyrin kovyrin committed Apr 5, 2010
Showing with 11 additions and 5 deletions.
  1. +6 −0 CHANGES
  2. +4 −4 README.rdoc
  3. +1 −1 lib/db_charmer.rb
@@ -1,3 +1,9 @@
+1.6.4 (2010-04-05):
+Default behaviour changed: DbCharmer.connections_should_exist is true in all environments
+by default. Old default behaviour was too misleading for many developers.
1.6.3 (2010-04-03):
Bugfix release: Modified stub connection initialization code to set default connections
@@ -127,10 +127,10 @@ Migration class example (global connection rewrite, multiple connections with th
-By default in development and test environments you could skip this <tt>:second_db</tt>
-connection from your database.yml files and rails would create the tables in your single database,
-but in production you'd specify it and get the table created on a separate server and/or in a
-separate database.
+By default in all environments <tt>on_db</tt> and <tt>db_magic</tt> statments would fail if
+specified connection does not exist in database.yml. It is possible to make +DbCharmer+
+ignore such situations in non-production environments so that rails would create the tables
+in your single database (especially useful in test databases).
This behaviour is controlled by the <tt>DbCharmer.connections_should_exist</tt>
configuration attribute which could be set from a rails initializer.
@@ -1,5 +1,5 @@
module DbCharmer
- @@connections_should_exist = Rails.env.production?
+ @@connections_should_exist = true
mattr_accessor :connections_should_exist
def self.connections_should_exist?

0 comments on commit e5b5f2c

Please sign in to comment.