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

Judge includes not added model's validations #91

Open
matedemorphy opened this issue Nov 28, 2019 · 1 comment
Open

Judge includes not added model's validations #91

matedemorphy opened this issue Nov 28, 2019 · 1 comment

Comments

@matedemorphy
Copy link

Hi, I've been solving different bugs for days, and now i realize that the gem it's adding validations tha i have not declared in the model. For example

validates :email, presence: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i }, on: :create

but adds uniqueness validation to the input, in fact even if a remove all the validations from the model, unless i remove :validate => true from the input field it will set all that validations the same.

@matedemorphy
Copy link
Author

this line: expose Admin, :email in judge.rb initializer solve in some way the error, but i don't want validate uniqueness from client side, even worst i'm getting this error now:

method_missing': undefined method has_one_attached' for Admin (call 'Admin.connection' to establish a connection)`

i'm using Active Storage in that same model: has_one_attached :avatar

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

No branches or pull requests

1 participant