mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
AM::Serializers::Xml depends on AM::Naming
This commit is contained in:
parent
b79444053c
commit
070329596f
4 changed files with 4 additions and 4 deletions
|
@ -10,6 +10,10 @@ module ActiveModel
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
include ActiveModel::Serialization
|
include ActiveModel::Serialization
|
||||||
|
|
||||||
|
included do
|
||||||
|
extend ActiveModel::Naming
|
||||||
|
end
|
||||||
|
|
||||||
class Serializer #:nodoc:
|
class Serializer #:nodoc:
|
||||||
class Attribute #:nodoc:
|
class Attribute #:nodoc:
|
||||||
attr_reader :name, :value, :type
|
attr_reader :name, :value, :type
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'models/automobile'
|
||||||
require 'active_support/core_ext/object/instance_variables'
|
require 'active_support/core_ext/object/instance_variables'
|
||||||
|
|
||||||
class Contact
|
class Contact
|
||||||
extend ActiveModel::Naming
|
|
||||||
include ActiveModel::Serializers::JSON
|
include ActiveModel::Serializers::JSON
|
||||||
include ActiveModel::Validations
|
include ActiveModel::Validations
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'active_support/core_ext/object/instance_variables'
|
||||||
require 'ostruct'
|
require 'ostruct'
|
||||||
|
|
||||||
class Contact
|
class Contact
|
||||||
extend ActiveModel::Naming
|
|
||||||
include ActiveModel::Serializers::Xml
|
include ActiveModel::Serializers::Xml
|
||||||
|
|
||||||
attr_accessor :address, :friends
|
attr_accessor :address, :friends
|
||||||
|
@ -25,7 +24,6 @@ class Customer < Struct.new(:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
class Address
|
class Address
|
||||||
extend ActiveModel::Naming
|
|
||||||
include ActiveModel::Serializers::Xml
|
include ActiveModel::Serializers::Xml
|
||||||
|
|
||||||
attr_accessor :street, :city, :state, :zip, :apt_number
|
attr_accessor :street, :city, :state, :zip, :apt_number
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class Contact
|
class Contact
|
||||||
extend ActiveModel::Naming
|
|
||||||
include ActiveModel::Conversion
|
include ActiveModel::Conversion
|
||||||
|
|
||||||
attr_accessor :id, :name, :age, :created_at, :awesome, :preferences
|
attr_accessor :id, :name, :age, :created_at, :awesome, :preferences
|
||||||
|
|
Loading…
Reference in a new issue