-
Notifications
You must be signed in to change notification settings - Fork 57
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
reflect_on_all_validations ??? #28
Comments
I submitted a pull request which added support to set required_attributes. It was accepted, so you can set required_attributes and it should work without reflect_on_all_validations |
still not working for me. NameError: undefined local variable or method `reflect_on_all_validations' for #Class:0xb6cc11d4 btw, i had another issue. p = Post.first(:include => :translations, :conditions => ["post_translations.locale = ?", 'en']) p.name returns 'title' p = Post.first(:include => :translations, :conditions => ["post_translations.locale = ?", 'pt-BR']) p.name returns nil why if i have both translations on my db? |
Have you set required attributes in your class? The patch was a method to set required_attributes so reflect_on_all_validations won't be called. |
thx man! even though, it is still not working for me.. such as: p = Post.with_translations(:'pt-BR').first p = Post.with_translations(:en).first if I do it hardcoded, such as: I cant find out my issue with this. |
On the following line: you use the method 'reflect_on_all_validations' but this method is nowhere defined (besides a plugin but this isn't installed)
http://github.com/joshmh/globalize2/blob/master/lib/globalize/active_record.rb#L106
This breaks the named scope (and others) which call the method ModelClass.required_attributes.
The text was updated successfully, but these errors were encountered: