Permalink
Browse files

Merge pull request #8038 from frodsan/fix_am_serializers_xml_dependency

Fix AM::Serializers::Xml dependency
  • Loading branch information...
1 parent 7f09bcd commit 4b1a7bcc4ceefeebaa14dbc2571a2e6cd593556d @jeremy jeremy committed with rafaelfranca Oct 27, 2012
@@ -2,8 +2,8 @@
require 'active_support/core_ext/class/attribute'
module ActiveModel
- # == Active Model JSON Serializer
module Serializers
+ # == Active Model JSON Serializer
module JSON
extend ActiveSupport::Concern
include ActiveModel::Serialization
@@ -5,12 +5,16 @@
require 'active_support/core_ext/hash/slice'
module ActiveModel
- # == Active Model XML Serializer
module Serializers
+ # == Active Model XML Serializer
module Xml
extend ActiveSupport::Concern
include ActiveModel::Serialization
+ included do
+ extend ActiveModel::Naming
+ end
+
class Serializer #:nodoc:
class Attribute #:nodoc:
attr_reader :name, :value, :type
@@ -4,7 +4,6 @@
require 'active_support/core_ext/object/instance_variables'
class Contact
- extend ActiveModel::Naming
include ActiveModel::Serializers::JSON
include ActiveModel::Validations
@@ -4,7 +4,6 @@
require 'ostruct'
class Contact
- extend ActiveModel::Naming
include ActiveModel::Serializers::Xml
attr_accessor :address, :friends
@@ -25,7 +24,6 @@ class Customer < Struct.new(:name)
end
class Address
- extend ActiveModel::Naming
include ActiveModel::Serializers::Xml
attr_accessor :street, :city, :state, :zip

0 comments on commit 4b1a7bc

Please sign in to comment.