diff options
author | André Galatti Faria <andreluisgalatti@hotmail.com> | 2019-07-25 11:34:10 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-25 11:34:10 -0300 |
commit | 1816348f7e4ee46bb82b96a6f1469448fd9fc204 (patch) | |
tree | 8fc97996059319f30cb05403e8c5fda47c58da79 /guides | |
parent | 1a0e9f5125e62dd441f2901270db9a1f2c9c96b9 (diff) | |
download | rails-1816348f7e4ee46bb82b96a6f1469448fd9fc204.tar.gz rails-1816348f7e4ee46bb82b96a6f1469448fd9fc204.tar.bz2 rails-1816348f7e4ee46bb82b96a6f1469448fd9fc204.zip |
Update action_view_overview.md
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/action_view_overview.md | 2 |
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 %> ``` |