i'm having trouble figuring out the usage of hooks.  in the
documentation it shows this:

 1 class Post
 2   include DataMapper::Resource
 3
 4   # ... key and properties here
 5
 6   # This record will save properly
 7   before :save do |post|
 8     true
 9   end
10

(from http://datamapper.org/docs/callbacks)

but when i do this, the object passed into the block is the value
"true", ie:

before :save do |post|
    puts post
end

puts "true" to the console


am i doing it wrong?

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

Reply via email to