client_side_validations icon indicating copy to clipboard operation
client_side_validations copied to clipboard

Error: settings is undefined

Open firozansari opened this issue 14 years ago • 4 comments

I am getting "settings is undefined" error message while submitting the form. Here is snippets of my form:

  = semantic_form_for @message, :url => contact_create_url, :validate => true do |f|
    .new_message_form
      = f.error_messages
      = f.inputs do
        = f.input :name, :required => true
        = f.input :email, :required => true
        = f.input :message, :required => true
      .clear
    = f.submit 'Send', :name => 'send'

Note that I am NOT passing symbol to the validate parameter as discussed in previous issue https://github.com/bcardarella/client_side_validations/issues/202 and in wiki page https://github.com/bcardarella/client_side_validations/wiki/Common-Gotchas

Thank you for your help.

firozansari avatar Dec 29 '11 22:12 firozansari

Here is exact error message shown by browser console:

Error: settings is undefined Source File: http://localhost:3000/assets/rails.validations.js Line: 27

firozansari avatar Dec 29 '11 23:12 firozansari

I'm sorry I took so long to get back to you on this. If you are still having this problem can you please gist the resulting HTML?

bcardarella avatar Jan 20 '12 08:01 bcardarella

Looks like at some point Rails switched from using "#{options[:as]new" to "new#{options[:as]".

https://github.com/ewpeters/client_side_validations/commit/ea378084e31dddab9e5267a675e88daa9419f601

ewpeters avatar Feb 08 '12 07:02 ewpeters

This was fixed in 8bc627d8

bcardarella avatar Jul 10 '12 01:07 bcardarella