Document Model delcared attributes

This commit is contained in:
Benjamin Fleischer
2017-01-19 16:07:47 -06:00
parent 9ccdb15610
commit 28c1b5bef6
2 changed files with 28 additions and 8 deletions

View File

@@ -56,14 +56,6 @@ module ActiveModelSerializers
base.attributes :id
end
# Override the initialize method so that attributes aren't processed.
#
# @param attributes [Hash]
def initialize(attributes = {})
@errors = ActiveModel::Errors.new(self)
super
end
# Override the +attributes+ method so that the hash is derived from +attribute_names+.
#
# The the fields in +attribute_names+ determines the returned hash.