mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
start implementing json_api adapter to understand how associations should work
This commit is contained in:
10
test/fixtures/poro.rb
vendored
10
test/fixtures/poro.rb
vendored
@@ -10,6 +10,16 @@ class Model
|
||||
@attributes[name]
|
||||
end
|
||||
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
|
||||
|
||||
class Profile < Model
|
||||
|
||||
Reference in New Issue
Block a user