jeudi 13 août 2015

rails 4 radio_button_tag default not selected

I'm using Rails 4 but I can't get the radio_button_tag to set the first option as default.

.field
  =radio_button_tag :type, "order", checked:"true", class: "rfi_radio"
  =label_tag :type_order, "Information pertaining to an order"
  br
  =radio_button_tag :type, "quote", class: "rfi_radio"
  =label_tag :type_quote, "Information pertaining to a quote"
  br
  =radio_button_tag :type, "customer", class: "rfi_radio"
  =label_tag :type_customer, "Information pertaining to a customer"
  br
  =radio_button_tag :type, "general", class: "rfi_radio"
  =label_tag :type_general, "General information"



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire