Permalink
Browse files

Remove 1.9 Hash syntax - tests passing on 1.8.7

  • Loading branch information...
1 parent 2abb2e6 commit afd7140b66e7cb32e1be58d9e44489e6bcbde0dc @wycats wycats committed Oct 15, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 activemodel/test/cases/serializer_test.rb
@@ -58,11 +58,11 @@ def initialize(comment, scope)
end
def serializable_hash
- { title: @comment.read_attribute_for_serialization(:title) }
+ { :title => @comment.read_attribute_for_serialization(:title) }
end
def as_json
- { comment: serializable_hash }
+ { :comment => serializable_hash }
end
end
@@ -258,7 +258,7 @@ def test_association_ids
serializer.class_eval do
def as_json(*)
- { post: serializable_hash }.merge(associations)
+ { :post => serializable_hash }.merge(associations)
end
end

0 comments on commit afd7140

Please sign in to comment.