From 02ef8d20a19f9548800eaefc0ebdf18fbd9a67be Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Thu, 4 Feb 2010 10:59:24 +1100 Subject: Adding guard to make sure test database declarations exist before trying to auto create --- activerecord/lib/active_record/railties/databases.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 4343bef3d4..ed7d2a045e 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -28,8 +28,8 @@ namespace :db do desc 'Create the database defined in config/database.yml for the current Rails.env - also makes test database if in development mode' task :create => :load_config do - # Make the test database at the same time as the development one - if Rails.env == 'development' + # Make the test database at the same time as the development one, if it exists + if Rails.env.development? && ActiveRecord::Base.configurations['test'] create_database(ActiveRecord::Base.configurations['test']) end create_database(ActiveRecord::Base.configurations[Rails.env]) -- cgit v1.2.3 From 639e044298eed903566086d297ae51a535082e73 Mon Sep 17 00:00:00 2001 From: SubbaRao Pasupuleti Date: Sun, 31 Jan 2010 23:52:05 -0500 Subject: removing , from ,= statement in WrappedDatabaseException constructor [#3830 state:committed] Signed-off-by: Jeremy Kemper --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 12feef4849..c4e07e8786 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -79,7 +79,7 @@ module ActiveRecord #:nodoc: def initialize(message, original_exception) super(message) - @original_exception, = original_exception + @original_exception = original_exception end end -- cgit v1.2.3