Created
May 8, 2012 16:19
-
-
Save gnufied/2636899 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
attr_accessible :name | |
after_commit :wow, :on => :create, :unless => :no_commit | |
attr_accessor :no_commit | |
def wow | |
puts "Calling wow" | |
self.no_commit = true | |
self.save | |
puts "Done called wow" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment