aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/category.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/category.rb')
-rw-r--r--activerecord/test/models/category.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/models/category.rb b/activerecord/test/models/category.rb
index e8654dca01..2ccc00bed9 100644
--- a/activerecord/test/models/category.rb
+++ b/activerecord/test/models/category.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Category < ActiveRecord::Base
has_and_belongs_to_many :posts
has_and_belongs_to_many :special_posts, class_name: "Post"
@@ -29,6 +31,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