Skip to content

Commit 935fc05

Browse files
authored
Merge pull request #329 from zinosama/improve-readme-with-id_method_name
Improve documentation with id_method_name
2 parents f3368de + 467024f commit 935fc05

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ set_type | Type name of Object | ```set_type :movie ```
429429
key | Key of Object | ```belongs_to :owner, key: :user ```
430430
set_id | ID of Object | ```set_id :owner_id ```
431431
cache_options | Hash to enable caching and set cache length | ```cache_options enabled: true, cache_length: 12.hours, race_condition_ttl: 10.seconds```
432-
id_method_name | Set custom method name to get ID of an object | ```has_many :locations, id_method_name: :place_ids ```
432+
id_method_name | Set custom method name to get ID of an object (If block is provided for the relationship, `id_method_name` is invoked on the return value of the block instead of the resource object) | ```has_many :locations, id_method_name: :place_ids ```
433433
object_method_name | Set custom method name to get related objects | ```has_many :locations, object_method_name: :places ```
434434
record_type | Set custom Object Type for a relationship | ```belongs_to :owner, record_type: :user```
435435
serializer | Set custom Serializer for a relationship | ```has_many :actors, serializer: :custom_actor``` or ```has_many :actors, serializer: MyApp::Api::V1::ActorSerializer```

lib/fast_jsonapi/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module FastJsonapi
2-
VERSION = "1.3"
2+
VERSION = "1.4"
33
end

0 commit comments

Comments
 (0)