-
Notifications
You must be signed in to change notification settings - Fork 403
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
Getting a 'method-missing' for User call #755
Comments
Hi, I'm going to check the readme about custom validators, but I do not think this issue is related to CSV. Could you please remove client side validations and try again? Also, Devise already provides an e-mail validator and its format is checked on the client side automatically, you don't need a custom one. If you need to change the format regexp (I advise to use their one, not the one on CSV documentation), you can find it in the devise initializer: https://github.com/plataformatec/devise/blob/master/lib/generators/templates/devise.rb#L174 |
I am familiar with the devise email validator, but that's not what I'm after here. I wanted to do client side validations in general. The email validator is the first thing I'm testing. I did remove all traces of CSV and ran my migration without any problems. It looks like Rails does not recognize the validators folder. I thought the CSV gem handles that part? I included all the code in my report. |
@denaliai-dev could you please try to run |
The application is not running yet, so I can't run spring stop |
Replicated without CSV. Repo: https://github.com/tagliala/csv-issue-755 Step-by-step guide:
I think there are issues with the back-end custom validators. I'm not going to close here because I think the documentation is wrong or outdated, but I'm going to exclude an issue with CSV itself Feel free to comment and let me know what is causing the issue, it may be helpful to others. I've noticed that my custom validators (example: https://github.com/DavyJonesLocker/client_side_validations/wiki/Custom-Validators#remote-validators) do not include the Are we sure that those helpers are still loaded like that in the recent versions of Rails? 🤔 |
This will prevent issue DavyJonesLocker/client_side_validations#755
Ok, sorry for the very late reply If you need named validator helpers such as I've clarified the wiki and fixed the readme, which was wrongly suggesting to put those named validators in Closing here |
I did:
I uncommented the following, in config/initializers/client_side_validations.rb:
Here's what my app/assets/javascript/application.js looks like:
I created a folder: app/validators, and added the following two files:
email_validator.rb:
and password_validator.rb:
In my app/models/user.rb, I have:
I also have the following file in app/assets/javascripts: rails.validations.customValidators.js:
I am not finished with the application yet, but wanted to generate a migration, as follows:
But, I am getting the following error message:
The text was updated successfully, but these errors were encountered: