aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-03-30 09:28:12 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-03-30 09:55:21 +0900
commit0bfeb481a0aa35eeca1c5230938fa61fee0faef2 (patch)
tree705aebd8bd1f5f1344ee556ed26f1dadc2073980 /activerecord/test/models/topic.rb
parentb9be64cc3e2959c974c3036a0eb5a37fc8c7d580 (diff)
downloadrails-0bfeb481a0aa35eeca1c5230938fa61fee0faef2.tar.gz
rails-0bfeb481a0aa35eeca1c5230938fa61fee0faef2.tar.bz2
rails-0bfeb481a0aa35eeca1c5230938fa61fee0faef2.zip
Deprecate accessibility of private/protected class methods in named scope
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r--activerecord/test/models/topic.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index a924cf86ae..fa50eeb6a4 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -12,12 +12,13 @@ class Topic < ActiveRecord::Base
scope :scope_with_lambda, lambda { all }
- scope :by_lifo, -> { where(author_name: author_name) }
+ scope :by_private_lifo, -> { where(author_name: private_lifo) }
+ scope :by_lifo, -> { where(author_name: "lifo") }
scope :replied, -> { where "replies_count > 0" }
class << self
private
- def author_name
+ def private_lifo
"lifo"
end
end