@@ -82,8 +82,8 @@ attribute :first_name, :string
82
82
83
83
{% include h.html tag="h4" text="2.1 Limiting Behavior" a="limiting-behavior" %}
84
84
85
- Each attribute consists of four flags: ` readable ` , ` writable ` ,
86
- ` sortable ` , and ` filterable ` . Any of these flags can be turned off:
85
+ Each attribute consists of five flags: ` readable ` , ` writable ` ,
86
+ ` sortable ` , ` filterable ` , and ` schema ` . Any of these flags can be turned off:
87
87
88
88
{% highlight ruby %}
89
89
attribute : name , : string , sortable: false
@@ -96,6 +96,9 @@ attribute :name, :string, only: [:sortable]
96
96
attribute : name , : string , except: [ : writable ]
97
97
{% endhighlight %}
98
98
99
+ The ` schema ` flag is not affected by ` only/except ` options.
100
+ This option determines if the attribute is exported to the schema.json.
101
+
99
102
You might want to allow behavior only if a certain condition is met.
100
103
Pass a symbol to guard this behavior via corresponding method, only allowing the
101
104
behavior if the method returns ` true ` :
@@ -130,6 +133,7 @@ self.attributes_readable_by_default = false # default true
130
133
self.attributes_writable_by_default = false # default true
131
134
self.attributes_filterable_by_default = false # default true
132
135
self.attributes_sortable_by_default = false # default true
136
+ self.attributes_schema_by_default = false # default true
133
137
{% endhighlight %}
134
138
135
139
{% include h.html tag="h4" text="2.3 Customizing Display" a="customizing-display" %}
0 commit comments