From 4afa5b81d83e78afc2c4c261dff9a204c57e7eb5 Mon Sep 17 00:00:00 2001 From: Orhan Toy Date: Wed, 25 Jul 2018 20:24:01 +0200 Subject: [PATCH 1/3] [ci skip] Fix punctuation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a03e1a8..53cec7b 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ end ``` ### Links Per Object -Links are defined in FastJsonapi using the `link` method. By default, link are read directly from the model property of the same name.In this example, `public_url` is expected to be a property of the object being serialized. +Links are defined in FastJsonapi using the `link` method. By default, link are read directly from the model property of the same name. In this example, `public_url` is expected to be a property of the object being serialized. You can configure the method to use on the object for example a link with key `self` will get set to the value returned by a method called `url` on the movie object. From b674909830720d298845c2221fe0c3280640c3a5 Mon Sep 17 00:00:00 2001 From: Shishir Kakaraddi Date: Wed, 19 Sep 2018 21:32:56 -0700 Subject: [PATCH 2/3] bump up version to 1.4 --- lib/fast_jsonapi/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fast_jsonapi/version.rb b/lib/fast_jsonapi/version.rb index f17716e..c9c4c7a 100644 --- a/lib/fast_jsonapi/version.rb +++ b/lib/fast_jsonapi/version.rb @@ -1,3 +1,3 @@ module FastJsonapi - VERSION = "1.3" + VERSION = "1.4" end From 467024f8fd315a15e4f4ada98ec1fd920b30c9e7 Mon Sep 17 00:00:00 2001 From: zino Date: Tue, 2 Oct 2018 11:36:21 -0400 Subject: [PATCH 3/3] Improve readme with id_method_name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0038b67..1d4afbc 100644 --- a/README.md +++ b/README.md @@ -429,7 +429,7 @@ set_type | Type name of Object | ```set_type :movie ``` key | Key of Object | ```belongs_to :owner, key: :user ``` set_id | ID of Object | ```set_id :owner_id ``` cache_options | Hash to enable caching and set cache length | ```cache_options enabled: true, cache_length: 12.hours, race_condition_ttl: 10.seconds``` -id_method_name | Set custom method name to get ID of an object | ```has_many :locations, id_method_name: :place_ids ``` +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 ``` object_method_name | Set custom method name to get related objects | ```has_many :locations, object_method_name: :places ``` record_type | Set custom Object Type for a relationship | ```belongs_to :owner, record_type: :user``` serializer | Set custom Serializer for a relationship | ```has_many :actors, serializer: :custom_actor``` or ```has_many :actors, serializer: MyApp::Api::V1::ActorSerializer```