collection_radio_buttons

collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
Instance Public methods

Wraps ActionView::Helpers::FormOptionsHelper#collection_radio_buttons for form builders:

<%= form_for @post do |f| %>
  <%= f.collection_radio_buttons :author_id, Author.all, :id, :name_with_initial %>
  <%= f.submit %>
<% end %>

Please refer to the documentation of the base helper for details.

doc_ruby_on_rails
2015-06-20 00:00:00
Comments
Leave a Comment

Please login to continue.