aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/category.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-05-28 23:35:50 +0930
committerGitHub <noreply@github.com>2017-05-28 23:35:50 +0930
commitaa3f4036c144ba2ab46d0ebac7a41bf18c8b6f47 (patch)
tree4c8f662cd322a9311987e14d984b4f29abd7cbc3 /activerecord/test/models/category.rb
parent352865d0f835c24daa9a2e9863dcc9dde9e5371a (diff)
parent2ee96632b640da0d09b164ed67b1a9f6b96594b3 (diff)
downloadrails-aa3f4036c144ba2ab46d0ebac7a41bf18c8b6f47.tar.gz
rails-aa3f4036c144ba2ab46d0ebac7a41bf18c8b6f47.tar.bz2
rails-aa3f4036c144ba2ab46d0ebac7a41bf18c8b6f47.zip
Merge pull request #29003 from kamipo/delegate_ast_and_locked_to_arel_explicitly
Delegate `ast` and `locked` to `arel` explicitly
Diffstat (limited to 'activerecord/test/models/category.rb')
-rw-r--r--activerecord/test/models/category.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/models/category.rb b/activerecord/test/models/category.rb
index e8654dca01..4b2840c653 100644
--- a/activerecord/test/models/category.rb
+++ b/activerecord/test/models/category.rb
@@ -29,6 +29,15 @@ class Category < ActiveRecord::Base
has_many :authors_with_select, -> { select "authors.*, categorizations.post_id" }, through: :categorizations, source: :author
scope :general, -> { where(name: "General") }
+
+ # Should be delegated `ast` and `locked` to `arel`.
+ def self.ast
+ raise
+ end
+
+ def self.locked
+ raise
+ end
end
class SpecialCategory < Category