Better AMS Model attributes interface

This commit is contained in:
Benjamin Fleischer
2016-11-20 23:25:09 -06:00
parent cd09e89006
commit 772b7999c5
12 changed files with 21 additions and 15 deletions

View File

@@ -31,7 +31,7 @@ end
# model.validate! # => ["cannot be nil"]
# model.errors.full_messages # => ["name cannot be nil"]
class ModelWithErrors < ::ActiveModelSerializers::Model
attr_accessor :name
attributes :name
end
class Profile < Model