Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
>> @chrome_history = "sqlite3:///Users/knowtheory/data/chrome_history"
=> "sqlite3:///Users/knowtheory/data/chrome_history"
>> require 'dm-chrome-history'
=> true
>> url = Url.first; url.valid?; url.errors
=> #<DataMapper::Validations::ValidationErrors:0x101619890 @errors=#<OrderedHash {:url=>["Url has an invalid format"], :last_visit_time=>["Last visit time must be an integer"]}, resource#<Url @id=1 @url=#<Addressable::URI:0x80b0d044 URI: @title="Knowtheory Mail" @visit_count=108 @typed_count=72 @last_visit_time=Wed Aug 25 09:32:57 -0400 2010 @hidden=0 @favicon_id=2>
>> class Url; property :url, String, :format => :url; property :last_visit_time, Integer, :required => true; end
=> #<DataMapper::Property::Integer @model=Url @name=:last_visit_time>
>> url = Url.first; url.valid?; url.errors
=> #<DataMapper::Validations::ValidationErrors:0x101596ff8 @errors=#<OrderedHash {}>, resource#<Url @id=1 @url="" @title="Knowtheory Mail" @visit_count=108 @typed_count=72 @last_visit_time=12927216777008553 @hidden=0 @favicon_id=2>
Copy link

knowtheory commented Sep 11, 2010

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