Validation won't work for properties defined by attr_accessor
Reported by BrianTheCoder | June 16th, 2008 @ 05:30 PM
The presence validation(and possibly others) breaks because a method(primitive) is called on the properties and it only exists for datamapper properties and not class properties.
Comments and changes to this ticket
-
Dan Kubb June 23rd, 2008 @ 07:18 PM
I'd like to add a quick note that it would be helpful when defining model properties if you could supply an option like :virtual => true, so that DM knew that the property was not to be persisted, but everything else in dm-core would work normally.
Sam, what do you think about that?
-
Sam Smoot June 23rd, 2008 @ 07:24 PM
Sounds good to me.
And we need to fix dm-validations regardless. It used to work. Just wasn't specced I guess, so it broke without notice.
-
BrianTheCoder June 24th, 2008 @ 01:18 AM
why not overwrite all attr_ methods to also call a property declaration? I haven't even looked if this is possible, but that's just what comes to mind for me.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
