Skip to content

Instantly share code, notes, and snippets.

View andrewroth's full-sized avatar

Andrew Roth andrewroth

  • Power to Change Ministries
  • Ontario, Canada
View GitHub Profile
@andrewroth
andrewroth / 0_reuse_code.js
Created January 3, 2016 01:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
module ActiveRecord
class Base
def before_destroy
associations_with_data.each { |assoc|
errors.add(:assoc, "association has data")
}
end
def associations_with_data
associations_with_data = []