diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-04-26 03:08:26 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-04-26 22:21:38 +0300 |
commit | e0604f75007b1630de80b206aed3a8ab41001ffd (patch) | |
tree | 15e1df3dd58451f7773d7dbf8b7fef11fdb825ae /activerecord/lib | |
parent | b6ac50b3ee2ff51203774cc0c2647a437237f396 (diff) | |
download | rails-e0604f75007b1630de80b206aed3a8ab41001ffd.tar.gz rails-e0604f75007b1630de80b206aed3a8ab41001ffd.tar.bz2 rails-e0604f75007b1630de80b206aed3a8ab41001ffd.zip |
Refactor AR::Tasks::DatabaseTasks::migrate
Set consistent type cast ENV["VERBOSE"]:
ENV["VERBOSE"] is true if it not equal "false"
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/tasks/database_tasks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index 46fa8a70a3..45110a79cd 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -164,7 +164,7 @@ module ActiveRecord def migrate raise "Empty VERSION provided" if ENV["VERSION"] && ENV["VERSION"].empty? - verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true + verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] != "false" : true version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil scope = ENV["SCOPE"] verbose_was, Migration.verbose = Migration.verbose, verbose |