File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
spec/example/app/resources Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,17 @@ def anchor_schema_name(name = nil)
12
12
@anchor_schema_name ||= name || anchor_default_schema_name
13
13
end
14
14
15
+ # @param reason [String] Reason to exclude from schema.
16
+ # @return [String]
17
+ def anchor_exclude_from_schema ( reason : nil )
18
+ @anchor_exclude_from_schema ||= reason || ( _abstract ? "Abstract." : nil )
19
+ end
20
+
21
+ # @return [Boolean] True if should be excluded.
22
+ def anchor_excluded_from_schema?
23
+ anchor_exclude_from_schema . present?
24
+ end
25
+
15
26
private
16
27
17
28
# @anchor_method_added_count[attribute] > 1 implies the attribute
Original file line number Diff line number Diff line change 1
- class CommentableResource < ApplicationResource ; end
1
+ class CommentableResource < ApplicationResource
2
+ anchor_exclude_from_schema reason : :polymorphic
3
+ end
You can’t perform that action at this time.
0 commit comments