Skip to content

Commit e248903

Browse files
authored
Update README.md
1 parent 9854e96 commit e248903

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Many other formatting and customizations are possible by overriding any of the f
193193
# Override this to customize the JSON:API "id" for this object.
194194
# Always return a string from this method to conform with the JSON:API spec.
195195
def id
196-
object.id.to_s
196+
object.slug.to_s
197197
end
198198
```
199199
```ruby
@@ -202,7 +202,7 @@ end
202202
# per the spec naming recommendations: http://jsonapi.org/recommendations/#naming
203203
# For example, 'MyApp::LongCommment' will become the 'long-comments' type.
204204
def type
205-
object.class.name.demodulize.tableize.dasherize
205+
'long-comments'
206206
end
207207
```
208208
```ruby

0 commit comments

Comments
 (0)