Created
July 17, 2012 13:50
-
-
Save andreyshuster/3129493 to your computer and use it in GitHub Desktop.
find diffs in hashes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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