mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
allow for a type attribute
* "namespace" json_api specific type method
This commit is contained in:
@@ -134,7 +134,7 @@ module ActiveModel
|
||||
object.id if object
|
||||
end
|
||||
|
||||
def type
|
||||
def json_api_type
|
||||
object.class.model_name.plural
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user