aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-06-29 02:11:28 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-06-29 03:27:45 +0900
commit425f2cacafc522bb0aa426a0a4bc92c1237160aa (patch)
treea9029da50775261f071c1fa1c58aa0fed31f18dc /activerecord/test/models
parent686e8fb52e00b24bd3a334cd7748df950914bfbf (diff)
downloadrails-425f2cacafc522bb0aa426a0a4bc92c1237160aa.tar.gz
rails-425f2cacafc522bb0aa426a0a4bc92c1237160aa.tar.bz2
rails-425f2cacafc522bb0aa426a0a4bc92c1237160aa.zip
Remove delegating to arel in a relation
The delegation was needed since passing `relation` with `relation.bound_attributes`. It should use `relation.arel` in that case.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/post.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb
index 4c913b3b72..ed64e0ee52 100644
--- a/activerecord/test/models/post.rb
+++ b/activerecord/test/models/post.rb
@@ -22,6 +22,7 @@ class Post < ActiveRecord::Base
scope :ranked_by_comments, -> { order("comments_count DESC") }
scope :limit_by, lambda { |l| limit(l) }
+ scope :locked, -> { lock }
belongs_to :author
belongs_to :readonly_author, -> { readonly }, class_name: "Author", foreign_key: :author_id