Skip to content

Commit 3a200d7

Browse files
authored
Minor doc update
Use model.class.name to do the correct comparison
1 parent f3a19bd commit 3a200d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/general/serializers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ the `ActiveModel::Serializer.serializer_for` method to return a serializer class
477477
```ruby
478478
class MySerializer < ActiveModel::Serializer
479479
def self.serializer_for(model, options)
480-
return SparseAdminSerializer if model.class == 'Admin'
480+
return SparseAdminSerializer if model.class.name == 'Admin'
481481
super
482482
end
483483

0 commit comments

Comments
 (0)