From 5f03172f54a58a57a48a3121562beb2cef866cbe Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 5 Jan 2017 18:50:18 +0900 Subject: Privatize unneededly protected methods in Active Record --- activerecord/test/cases/migration_test.rb | 2 +- activerecord/test/models/company.rb | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 082cfd3242..1602b3f757 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -887,7 +887,7 @@ if ActiveRecord::Base.connection.supports_bulk_alter? assert_equal :datetime, column(:birthdate).type end - protected + private def with_bulk_change_table # Reset columns/indexes cache as we're changing the table diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 4561b3132b..20e37710e7 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -216,14 +216,12 @@ class Account < ActiveRecord::Base validate :check_empty_credit_limit - protected + private def check_empty_credit_limit errors.add("credit_limit", :blank) if credit_limit.blank? end - private - def private_method "Sir, yes sir!" end -- cgit v1.2.3