From 1816348f7e4ee46bb82b96a6f1469448fd9fc204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Galatti=20Faria?= Date: Thu, 25 Jul 2019 11:34:10 -0300 Subject: Update action_view_overview.md --- guides/source/action_view_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides') 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 %> ``` -- cgit v1.2.3