Skip to content

Instantly share code, notes, and snippets.

@apolzon
Created March 9, 2012 18:25
Show Gist options
  • Select an option

  • Save apolzon/2007890 to your computer and use it in GitHub Desktop.

Select an option

Save apolzon/2007890 to your computer and use it in GitHub Desktop.
Form Helper fields_for bug
= f.fields_for :questions do |question_form|
- if question_form.object.needs_answer?
%li
= question_form.label :answer, question_form.object.decrypted_question
= question_form.password_field :answer
- question_form.object.encrypted_answer = SecurityQuestion::DIRTY_ANSWER
= question_form.hidden_field :encrypted_answer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment