aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
Diffstat (limited to 'guides')
-rw-r--r--guides/source/action_view_overview.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md
index c0b53428c7..dda3ae0863 100644
--- a/guides/source/action_view_overview.md
+++ b/guides/source/action_view_overview.md
@@ -1048,7 +1048,7 @@ To access the passed options programatically (e.g. adding a custom class if chec
```html+erb
<%= collection_radio_buttons(:article, :author_id, Author.all, :id, :name_with_initial, {checked: Author.last, required: true} do |rb| %>
- <%= rb.label(class: "#{'my-custom-class' if rb.instance_values['input_html_options'][:checked]}") { rb.radio_button + rb.text } %>
+ <%= rb.label(class: "#{'my-custom-class' if rb.value == Author.last.id}") { rb.radio_button + rb.text } %>
<% end %>
```