Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems mixing wizardly with formtastic #5

Open
matellis opened this issue Oct 22, 2009 · 1 comment
Open

Problems mixing wizardly with formtastic #5

matellis opened this issue Oct 22, 2009 · 1 comment

Comments

@matellis
Copy link

Inline errors don't work with justinfrench_formtastic when using the form.inputs or form.errors_on methods. Stepping through a trace it looks as if the regular form helper is called when there is an error. The piece of the code in formtastic that handles the input method is never ran. You can show this by making your form a partial with 1 step in wizardly. When the partial is shown outside of wizardly the inline errors are displayed, but inside wizardly they are not. The errors object is just fine, if you add it to the top of the form you will see any validation errors.

@matellis
Copy link
Author

Dumb dumb dumb. Wizardly demo app refers to forms like this:

<% form_for :user_signup, :url=>{:action=>:account}  do |f| %>

Which works great for form_helper, but not for formtastic. Formtastic passes through anything it doesn't understand to form_helper, so the form doesn't break but any Formtastic features are quietly turned off.

Rename your object as below and everything works nicely:

<% form_for @user_signup, :url=>{:action=>:account}  do |f| %>

Not really a wizardly problem. At least this might save some other noob a few hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant