On Oct 12, 2009, at 10:52 pm, Tony Mann wrote:

> DM 0.9 turned blank strings into nil values for Integer properties,  
> which still seems like the right thing to do. Rejecting a blank  
> string as an illegal field value seems like the worst of all  
> possible behaviors.

Except:

   nil.to_i # => 0

This is dangerous, because the user may well not have meant "0".


> I do not see this as data scrubbing, but rather sensible  
> typecasting. The Integer property accepts strings like "5", so  
> accepting a string like "" is a natural feature.

Except, there is no integer that can be represented as "".  That's why  
I find this confusing.

Ashley

-- 
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to