Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/active_model/serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def embed(type, options={})
def serializer_for(resource)
if resource.respond_to?(:to_ary)
ArraySerializer
elsif resource.respond_to?(:serializer_class)
resource.serializer_class
else
begin
Object.const_get "#{resource.class.name}Serializer"
Expand Down