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
|
||||
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 'models/automobile'
|
|||
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 'active_support/core_ext/object/instance_variables'
|
|||
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, :apt_number
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class Contact
|
||||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
|
||||
attr_accessor :id, :name, :age, :created_at, :awesome, :preferences
|
||||
|
|
Loading…
Reference in a new issue