diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-03 17:03:21 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-03 17:03:21 -0800 |
commit | 9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6 (patch) | |
tree | ea807c0794b6262c91a3f503361e6930892d78d7 | |
parent | 639e044298eed903566086d297ae51a535082e73 (diff) | |
parent | 1ae543a180095efef5ad59eb9883748ca20cebcf (diff) | |
download | rails-9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6.tar.gz rails-9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6.tar.bz2 rails-9b033d14b240ae1ae8b1486af1d0afa8ae2a1ec6.zip |
Merge remote branch 'mikel/master'
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 4 | ||||
-rw-r--r-- | railties/lib/rails/commands.rb | 3 |
2 files changed, 5 insertions, 2 deletions
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]) diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb index f0dcf61d98..4240038673 100644 --- a/railties/lib/rails/commands.rb +++ b/railties/lib/rails/commands.rb @@ -59,6 +59,9 @@ when 'runner' require 'rails/commands/runner' require ENV_PATH + +when '--version', '-v' + puts "Rails #{Rails::VERSION::STRING}" when '--help', '-h' puts HELP_TEXT when '--version', '-v' |