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

ActiveModel validaitons not working #65

Open
freiden opened this issue Aug 8, 2018 · 4 comments
Open

ActiveModel validaitons not working #65

freiden opened this issue Aug 8, 2018 · 4 comments

Comments

@freiden
Copy link

freiden commented Aug 8, 2018

Hi,

In my project, when using:

extend ActiveModel::ModelValidations

 copy_validations_from Model

The validations from my models are not backported to the Form.

After taking a look at the code it seems like the issues is coming from Mapping.from_representable_attrs(definitions) in the copy_validations_from method, definitions is always returning {} which prevent the mapping of the attributes in from_representable_attrs and prevent the method inverse_image to return any value.

Did I miss an element to set to make the validations work?

@apotonick
Copy link
Member

Hi! Ideally, you'd patch this because this feature has been abandoned for a long time - can you find out what went wrong and help us with it? 😍

@freiden
Copy link
Author

freiden commented Aug 11, 2018

@apotonick Is it only this part of the implementation or the AR in it's totality?

@apotonick
Copy link
Member

Only the copying, everything else works fine! Thanks!

@freiden
Copy link
Author

freiden commented Aug 12, 2018

@apotonick I will try to make fix/patch for this and then make a PR for it.

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

2 participants