RailsCasts Pro episodes are now free!

Learn more or hide this

Yuri Smirnov's Profile

GitHub User: tycooon

Comments by Yuri Smirnov

Avatar

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

Avatar

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

erb
<%= 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.