Reputation: 8506
I am using Rails 4.2 with Ruby 2.1.5
I have a table name "API" and has "status" column.
How do I create form_for radio buttons base on status data in view template?
Upvotes: 0
Views: 188
Reputation: 176472
Here's a simple example
<% form_for(...) do |f| %>
<%= f.radio_button :status, 'alpha' %>
<%= f.radio_button :status, 'beta' %>
<% end %>
For more details you should check the radio_button
helper documentation.
Upvotes: 3