aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/tasks
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-03-02 05:06:23 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-03-02 05:06:23 +0900
commit97742f3012c8a8564c511131164e746e4b372d9b (patch)
tree58144604161f23f6c3544397d86acb5c3b3b3f03 /activerecord/lib/active_record/tasks
parentcf2492bb1d511049676153677f0691add82f8641 (diff)
downloadrails-97742f3012c8a8564c511131164e746e4b372d9b.tar.gz
rails-97742f3012c8a8564c511131164e746e4b372d9b.tar.bz2
rails-97742f3012c8a8564c511131164e746e4b372d9b.zip
Don't expose `verbose?` helper method
Follow up of b988ecb99ff6c8854e4b74ef8a7ade8d9ef5d954. This was added for internal usage, it doesn't need to be public.
Diffstat (limited to 'activerecord/lib/active_record/tasks')
-rw-r--r--activerecord/lib/active_record/tasks/database_tasks.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb
index d8e0cd1e30..af1bbc7e93 100644
--- a/activerecord/lib/active_record/tasks/database_tasks.rb
+++ b/activerecord/lib/active_record/tasks/database_tasks.rb
@@ -163,16 +163,11 @@ module ActiveRecord
}
end
- def verbose?
- ENV["VERBOSE"] ? ENV["VERBOSE"] != "false" : true
- end
-
def migrate
check_target_version
- verbose = verbose?
scope = ENV["SCOPE"]
- verbose_was, Migration.verbose = Migration.verbose, verbose
+ verbose_was, Migration.verbose = Migration.verbose, verbose?
Base.connection.migration_context.migrate(target_version) do |migration|
scope.blank? || scope == migration.scope
end
@@ -301,6 +296,9 @@ module ActiveRecord
end
private
+ def verbose?
+ ENV["VERBOSE"] ? ENV["VERBOSE"] != "false" : true
+ end
def class_for_adapter(adapter)
_key, task = @tasks.each_pair.detect { |pattern, _task| adapter[pattern] }