> I am using context with validations.  I cannot tell if there is a way
> to limit my before and after hooks by context as well.  It looks as
> though contexts are only in dm-validations.

 Jon,

 I pushed a fix a while back to dm-validations
 (http://github.com/sam/dm-more/commit/d574d29078b7f3afe087d4693f81ee434d35482b)
 that makes hooking save with contexts possible.

  before :save do |context|
    # context will be:
    #   :default - if you call user.save
    #   nil      - if you call user.save!
    # or, the context you passed in - user.save(:registration)
  end

 Bernerd Schaefer

--~--~---------~--~----~------------~-------~--~----~
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