You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a column :sex in the user table which is a text field in the database.
And a formtastic form that renders it as
<%= form.input :sex, :as => :radio, :label => 'Title', :collection => [["Mr.", 'male'], ["Mrs.", 'female']], :required => true %>
When I add "validates_presence_of :sex" to the model then all client-side validation fails. OnLoad of the html a javascript error occurs. Firebug says the following (I don't know if that helps):
OK, no I actually have no clue what that can be. =/ Validatious-On-Rails is far from "complete" (not meant to be used in production yet), and right now I'm trying to finalize the code base refactoring (major one that makes it' trivial to extend with custom model validations). Haven't had much time to spend on this project this month though, but just got started a bit again so I probably won't prioritize JavaScript stuff until I'm satisfied with the "behind the scenes" stuff. Would be awesome if you could trace the reason for this, I haven't experienced any similar one myself. Actually I hope more people could join in on solving JavaScript issues as I'm more of a JavaScript amateur myself. =)
I have a column :sex in the user table which is a text field in the database.
And a formtastic form that renders it as
<%= form.input :sex, :as => :radio, :label => 'Title', :collection => [["Mr.", 'male'], ["Mrs.", 'female']], :required => true %>
When I add "validates_presence_of :sex" to the model then all client-side validation fails. OnLoad of the html a javascript error occurs. Firebug says the following (I don't know if that helps):
this.__elements[0] is undefined
http://localhost:3000/javascripts/v2.standalone.full.min.js?1259591608
G()()v2.stand...259591608 (Linie 7)
G()()v2.stand...259591608 (Linie 7)
G()()v2.stand...259591608 (Linie 7)
G()(Object __events=[2] __elements=[0] __monitored=true, Object __name=presence __message=can't be blank, [], undefined)v2.stand...259591608 (Linie 7)
G()()v2.stand...259591608 (Linie 7)
G()(Object __name=presence __message=can't be blank, [], undefined)v2.stand...259591608 (Linie 7)
G()([Object validator=Object params=[0] invert=false 0=Object], Object __validators=[0] __errors=[0] __passOnAny=false, "")v2.stand...259591608 (Linie 7)
G()(form#user_form.validate users, Object __validators=[0] __errors=[0] __passOnAny=false, [])v2.stand...259591608 (Linie 7)
G()(form#user_form.validate users)v2.stand...259591608 (Linie 7)
G()()v2.stand...259591608 (Linie 7)
G()()v2.stand...259591608 (Linie 7)
G()()v2.stand...259591608 (Linie 7)
[Break on this error] var addDOMLoadEvent=(function(){var F=[]...getElementsByTagName("input")[0]:A)}}});
The text was updated successfully, but these errors were encountered: