Created
July 19, 2012 17:47
-
-
Save panSarin/3145598 to your computer and use it in GitHub Desktop.
User with nested attributes , error on password problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= simple_form_for [:admin, @user], remote: true, html: { novalidate: 'true'} do |f| | |
.tab-content | |
#basic.tab-pane.active | |
= f.input :login | |
= f.simple_fields_for :password_attributes do |pass| | |
= pass.input :password, label: 'Hasło' | |
= pass.input :password_confirmation, label: "Potwierdzenie hasła" | |
= pass.input :user_id, as: :hidden, input_html: {value: @user.id }, wrapper: :default | |
#personal.tab-pane | |
= f.simple_fields_for (@user.persisted? ? :personal : :personal_attributes), @user.personal do |p| | |
= p.input :pesel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment