diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-06-30 14:23:11 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-06-30 14:23:14 -0300 |
commit | 4662c5f4effd829099d647a7a76c7044fcc68121 (patch) | |
tree | 912b536ceaa13c886a5b5704ff48ff9da353f575 | |
parent | 350e9c6c170038a9241c96146302e82d9f74a6d2 (diff) | |
download | rails-4662c5f4effd829099d647a7a76c7044fcc68121.tar.gz rails-4662c5f4effd829099d647a7a76c7044fcc68121.tar.bz2 rails-4662c5f4effd829099d647a7a76c7044fcc68121.zip |
Fix collation database task to use begin..rescue..end
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 52fa4fb8be..78ecb1cdc5 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -148,9 +148,11 @@ db_namespace = namespace :db do # desc "Retrieves the collation for the current environment's database" task :collation => [:environment, :load_config] do - puts ActiveRecord::Tasks::DatabaseTasks.collation_current - ensure NoMethodError - $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch' + begin + puts ActiveRecord::Tasks::DatabaseTasks.collation_current + rescue NoMethodError + $stderr.puts 'Sorry, your database adapter is not supported yet, feel free to submit a patch' + end end desc 'Retrieves the current schema version number' @@ -269,7 +271,7 @@ db_namespace = namespace :db do ENV['ISC_USER'] = config['username'].to_s if config['username'] ENV['ISC_PASSWORD'] = config['password'].to_s if config['password'] end - + def firebird_db_string(config) FireRuby::Database.db_string_for(config.symbolize_keys) end |