Ruby gem simple_form 3.1.0 radio button -



Ruby gem simple_form 3.1.0 radio button -

i utilize simple_form displaying radio button boolean attribute

<%= simple_form_for @model |f| %> <%= f.input :is_deleted, as: :radio_buttons %> <% end %>

but instead of 2 radio buttons yes/no titles see titles yes/no , no radio buttons. what's wrong?

edit

try this:

<%= simple_form_for @model |f| %> <%= f.input :is_deleted, as: :radio_buttons, :collection => [[true, 'yes'], [false, 'no']] %> <% end %>

obviously can substitute whatever values want display "yes" , "no"

ruby-on-rails ruby radio-button simple-form

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -