lib/jsonapi-serializers/attributes.rb in jsonapi-serializers-0.3.1 vs lib/jsonapi-serializers/attributes.rb in jsonapi-serializers-0.4.0
- old
+ new
@@ -15,9 +15,13 @@
def attribute(name, options = {}, &block)
add_attribute(name, options, &block)
end
+ def attributes(*names)
+ names.each { |name| add_attribute(name) }
+ end
+
def has_one(name, options = {}, &block)
add_to_one_association(name, options, &block)
end
def has_many(name, options = {}, &block)