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

Remove validations? #22

Closed
jgaskins opened this issue Jan 28, 2013 · 2 comments
Closed

Remove validations? #22

jgaskins opened this issue Jan 28, 2013 · 2 comments

Comments

@jgaskins
Copy link
Owner

I'm on the fence about whether including validations with persistence is a good idea, leaning more toward removing them. Since we're only serializing object state, if you keep invalid state out of the objects you don't need to worry about persisting invalid data.

Since Perpetuity validations are extremely minimal — we only validate presence and string length at the moment, IIRC — we could probably gut this with minimal ramifications.

Validating data is extremely important in production apps and it isn't a simple task, so if there isn't a nice Ruby gem that validates POROs, we may need to keep — and drastically improve — validation support.

@jgaskins jgaskins closed this as completed Oct 5, 2013
@dkubb
Copy link

dkubb commented Oct 5, 2013

There is the vanguard gem that eventually will support all the common validations in AR and DM: https://github.com/mbj/vanguard

@jgaskins
Copy link
Owner Author

jgaskins commented Oct 6, 2013

I remembered one of you guys having a gem for validations, but at the time I began putting validations into Perpetuity it was still very young. I've already removed the validations in 6b5e542, but forgot to update this issue until this evening.

It's great to see people working on an entire ecosystem to make using the DM pattern in Ruby easier.

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