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)
1212 @anchor_schema_name ||= name || anchor_default_schema_name
1313 end
1414
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+
1526 private
1627
1728 # @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