Skip to content

Instantly share code, notes, and snippets.

@andreyshuster
Created July 17, 2012 13:50
Show Gist options
  • Save andreyshuster/3129493 to your computer and use it in GitHub Desktop.
Save andreyshuster/3129493 to your computer and use it in GitHub Desktop.
find diffs in hashes
3425198 2012-08-22 12:41:34 public add this to config/envoronments/development.rb to set pry as default rails console
3129493 2012-07-17 13:50:22 public find diffs in hashes
def diff(h2)
dup.delete_if { |k, v|
h2[k] == v
}.merge!(h2.dup.delete_if { |k, v|
has_key?(k)
})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment