Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Yuri Smirnov's Profile

GitHub User: tycooon

Comments by Yuri Smirnov


I think the short variant of form won't work since there should be password confirmation validation in the model.


You can pass a block to f.input or f.association call and use rails form helpers there like this:

<%= f.input :state do %>
  <%= f.grouped_collection_select :state_id, Country.order(:name), :states, :name, :id, :name, include_blank: true %>
<% end %>

Doing so, you get simple_form's, label, hint and other stuff, but overwrite only the actual input to the one you need.