This file contains 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
<!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, ''); | |
} |
This file contains 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 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) |
This file contains 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
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. |