Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
// IE doesn't have trim method
if(typeof String.prototype.trim !== 'function') {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
}
def test_deep_merge
@ordered_hash['deep'] = ActiveSupport::OrderedHash.new
@ordered_hash['deep']['number'] = 1
@ordered_hash['deep']['place'] = 'here'
other_hash = ActiveSupport::OrderedHash.new
other_hash['deep'] = ActiveSupport::OrderedHash.new
other_hash['deep']['number'] = 5
merged = @ordered_hash.deep_merge(other_hash)
require File.expand_path('../boot', __FILE__)
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require 'mongoid/railtie'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.