Skip to content

Instantly share code, notes, and snippets.

@gnufied
Created May 8, 2012 16:19
Show Gist options
  • Save gnufied/2636899 to your computer and use it in GitHub Desktop.
Save gnufied/2636899 to your computer and use it in GitHub Desktop.
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