Elegant way to validate a single attribute? #101

Closed
jkwan opened this Issue Apr 25, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@jkwan

jkwan commented Apr 25, 2012

Hi there,

Big fan of your gem! I was wondering if there is an elegant way to validate a single attribute of a model that uses ActiveAttr?

I'd love to be able to do something like:

MyModel.my_attribute.valid?

Currently, I'm using my own boolean methods like :if => :should_validate_my_attribute? in the validation definitions, but that is clunky.

Thanks,

Josh

@jkwan jkwan closed this May 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment