Skip to content

Instantly share code, notes, and snippets.

@npj
Created May 4, 2012 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save npj/2596225 to your computer and use it in GitHub Desktop.
Save npj/2596225 to your computer and use it in GitHub Desktop.
class PostObserver
def after_save(post)
Slug[post.slug] = post.id
return true
end
def after_destroy(post)
Slug.destroy(post.id)
return true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment