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

v2.rails is undefined #26

Open
bwlang opened this issue Nov 19, 2009 · 0 comments
Open

v2.rails is undefined #26

bwlang opened this issue Nov 19, 2009 · 0 comments

Comments

@bwlang
Copy link
Contributor

bwlang commented Nov 19, 2009

When I loaded up a form with a regex validation it seems to work okay, but i see the above error in firebug.

I think somehow FormatWithValidator is instantiated before the v2.rails and v2.rails.params are instantiated.
I worked around it by changing the line to

self.data = %{
v2.rails = {}; v2.rails.params = {}; v2.rails.params['#{args.first}'] = #{data.inspect.gsub(/\A/, '^').gsub(/\z/, '$')};
}
which obviously sucks since it wipes out any existing values, but works okay for me since I only have one validator. I don't know how to fix this properly (maybe a call to some function that checks then instantiates or somehow force v2.rails.js to be interpreted before this instantiation.)

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

No branches or pull requests

1 participant