Skip to content

Commit 8a5f575

Browse files
committed
Update Readme
add new relation_name option on associations and example
1 parent cb6697c commit 8a5f575

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ end
269269
```ruby
270270
class BookResource < JSONAPI::Resource
271271

272-
# Only book_admins may see unapproved comments for a book. Using a lambda to select the correct relation on the model
272+
# Only book_admins may see unapproved comments for a book. Using
273+
# a lambda to select the correct relation on the model
273274
has_many :book_comments, relation_name: -> (options = {}) {
274275
context = options[:context]
275276
current_user = context ? context[:current_user] : nil

0 commit comments

Comments
 (0)