提交 e3d6d10e 编写于 作者: J Joshua Peek

Ensure JSON serializer includes model naming

上级 a4bdc00f
......@@ -10,6 +10,8 @@ module JSON
include ActiveModel::Attributes
included do
extend ActiveModel::Naming
cattr_accessor :include_root_in_json, :instance_writer => false
end
......
......@@ -2,7 +2,6 @@
class JsonSerializationTest < ActiveModel::TestCase
class Contact
extend ActiveModel::Naming
include ActiveModel::Serializers::JSON
attr_accessor :name, :age, :created_at, :awesome, :preferences
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册