Skip to content

Commit 4d613c2

Browse files
authored
Add custom field non-existing getters and setters notice (#289)
1 parent 0189b78 commit 4d613c2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/3.0/custom-fields.md

+12
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,15 @@ Next, in your fields `Show` component, you need to do a few things.
374374
```
375375

376376
<Image src="/assets/img/stimulus/hidden_input_color.gif" width="1000" height="76" alt="Hidden input controller" />
377+
378+
### Non existing model field
379+
380+
To ensure proper rendering of a custom field that lacks getters and setters at the model level, you must implement these methods within the model.
381+
382+
```ruby
383+
def custom_field
384+
end
385+
386+
def custom_field=(value)
387+
end
388+
```

0 commit comments

Comments
 (0)