Skip to content

Instantly share code, notes, and snippets.

@mehlah
Created November 29, 2015 19:11
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 mehlah/fa4eda72268451244723 to your computer and use it in GitHub Desktop.
Save mehlah/fa4eda72268451244723 to your computer and use it in GitHub Desktop.
class Record
def save
p 'saved!'
end
end
module Validation
def save
p 'validated!'
super
end
end
Record.send :prepend, Validation
Record.new.save
#=> "validated!"
#=> "saved!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment