Skip to content

Instantly share code, notes, and snippets.

@xxx
Created November 10, 2009 05:44
Show Gist options
  • Save xxx/230650 to your computer and use it in GitHub Desktop.
Save xxx/230650 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'dm-core'
class Foo
include DataMapper::Resource
property :is_admin, Boolean, :default => false, :key => true
end
f = Foo.new
p f.dirty?
f.update(:is_admin => true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment