Skip to content

Instantly share code, notes, and snippets.

@alvarobp
Created July 8, 2010 11:15
Show Gist options
  • Save alvarobp/467896 to your computer and use it in GitHub Desktop.
Save alvarobp/467896 to your computer and use it in GitHub Desktop.
def show_callbacks(klass)
ActiveRecord::Callbacks::CALLBACKS.each do |type|
puts "#{type}"
klass.send("#{type}_callback_chain").each {|c| puts " #{c.method}"}
puts
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment