Skip to content

Commit 7d89e26

Browse files
author
jeffrey008
authored
Update README.md
1 parent 29166b2 commit 7d89e26

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ end
234234

235235
You can specify that serializers use the lower-camel key format at the config, class or instance level.
236236

237-
````ruby
237+
```ruby
238238

239239
ActiveModel::Serializer.setup do |config|
240240
config.key_format = :lower_camel
@@ -245,17 +245,17 @@ class BlogLowerCamelSerializer < ActiveModel::Serializer
245245
end
246246

247247
BlogSerializer.new(object, key_format: :lower_camel)
248-
````
248+
```
249249

250250
## Changing the default association key type
251251

252252
You can specify that serializers use unsuffixed names as association keys by default.
253253

254-
````ruby
254+
```ruby
255255
ActiveModel::Serializer.setup do |config|
256256
config.default_key_type = :name
257257
end
258-
````
258+
```
259259

260260
This will build association keys like `comments` or `author` instead of `comment_ids` or `author_id`.
261261

@@ -932,7 +932,7 @@ now generates:
932932
class PostSerializer < ApplicationSerializer
933933
attributes :id
934934
end
935-
````
935+
```
936936

937937
# Design and Implementation Guidelines
938938

0 commit comments

Comments
 (0)