Skip to content

Instantly share code, notes, and snippets.

@thebentern
Created August 18, 2016 14:08
Show Gist options
  • Save thebentern/bb607b272776c4d18191ba668d04f1fe to your computer and use it in GitHub Desktop.
Save thebentern/bb607b272776c4d18191ba668d04f1fe to your computer and use it in GitHub Desktop.
Display model callbacks for :save :after
pp Model
._save_callbacks
.select {|cb| cb.kind == :after}
.map{|cb| { key: cb.instance_variable_get(:@key), name: cb.instance_variable_get(:@name)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment