24 Apr '12, 9pm

@jonmarkgo would Hash#diff work? #railsconf

# File activesupport/lib/active_support/json/encoding.rb, line 245 def encode_json (encoder ) # values are encoded with use_options = false, because we don't want hash representations from ActiveModel to be # processed once again with as_json with options, as this could cause unexpected results (i.e. missing fields); # on the other hand, we need to run as_json on the elements, because the model representation may contain fields # like Time/Date in their original (not jsonified) form, etc. "{#{map { |k,v| "#{encoder.encode(k.to_s)}:#{encoder.encode(v, false)}" } * ','}}"

Full article: http://api.rubyonrails.org/classes/Hash.html#method-i-diff

Tweets

@rauhryan more helpful?

api.rubyonrails.org 28 Apr '12, 3pm

# File activesupport/lib/active_support/json/encoding.rb, line 245 def encode_json (encoder ) # values are encoded with us...

tb-0.6 をリリースした。http://t.co/DE6SRA5T 今回は unmelt ...

rubygems.org 29 Apr '12, 1am

tb is a manipulation tool for table: CSV, TSV, JSON, etc. tb provides a command and a library for manipulating tables: Uni...

By popular demand, a gem you can install to get...

rubygems.org 26 Apr '12, 1am

thread_safe 0.0.2 Thread-safe collections and utilities for Ruby install gem install thread_safe Download Documentation Su...

Just released FactoryGirl 3.2; there's so much ...

robots.thoughtbot.com 24 Apr '12, 5pm

April 24, 2012 Tagged: factory girl testing rspec Comments (View) FactoryGirl 3.2: so awesome it needs to be released duri...