diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2010-02-03 17:31:35 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-02-03 17:31:35 -0800 |
commit | dd13874ff60371b51bd436e70943db932b180b45 (patch) | |
tree | a0bbbdab818d5b802f86811d50f0461f7b0b5d75 /activerecord/lib | |
parent | 79817aa9e7fa7c207868ca56ca8bbd0ee5303d81 (diff) | |
parent | 9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6 (diff) | |
download | rails-dd13874ff60371b51bd436e70943db932b180b45.tar.gz rails-dd13874ff60371b51bd436e70943db932b180b45.tar.bz2 rails-dd13874ff60371b51bd436e70943db932b180b45.zip |
Merge
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 4 |
2 files changed, 3 insertions, 3 deletions
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 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]) |