On Jun 16, 8:55 am, zakjan <[email protected]> wrote: > Hi, > > why Datamapper::Type is deprecated and how to rewrite it?
Type and Property have been unified and now it's just Property that does everything that Type used to do. Type will be completely removed from the core in DataMapper 1.1. > > FacebookUid < DataMapper::Type is deprecated, use the new > DataMapper::Property API instead (/home/zakjan/.rvm/gems/ruby-1.8.7- > p249/gems/dm-validations-1.0.0/lib/dm-validations.rb:41:in `new') > > class FacebookUid < DataMapper::Type > primitive Integer > min 1 > max 2**64-1 > end Just do: class FacebookUid < DataMapper::Property::Integer min 1 max 2**64-1 end Hope this helps. You can read more in this thread: http://groups.google.com/group/datamapper/browse_thread/thread/5d3d212c3614db36 // solnic -- 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.
