mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 14:56:50 +00:00
Remove dead code
This commit is contained in:
parent
bac43af0e6
commit
839d1ab21c
@ -3,26 +3,6 @@ require 'test_helper'
|
|||||||
module ActiveModel
|
module ActiveModel
|
||||||
class Serializer
|
class Serializer
|
||||||
class AssociationsTest < Minitest::Test
|
class AssociationsTest < Minitest::Test
|
||||||
class Model
|
|
||||||
def initialize(hash = {})
|
|
||||||
@attributes = hash
|
|
||||||
end
|
|
||||||
|
|
||||||
def read_attribute_for_serialization(name)
|
|
||||||
@attributes[name]
|
|
||||||
end
|
|
||||||
|
|
||||||
def method_missing(meth, *args)
|
|
||||||
if meth.to_s =~ /^(.*)=$/
|
|
||||||
@attributes[$1.to_sym] = args[0]
|
|
||||||
elsif @attributes.key?(meth)
|
|
||||||
@attributes[meth]
|
|
||||||
else
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@author = Author.new(name: 'Steve K.')
|
@author = Author.new(name: 'Steve K.')
|
||||||
@author.bio = nil
|
@author.bio = nil
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user