Skip to content

1.6.0 - #18

Merged
kpheasey merged 44 commits into
masterfrom
dev
Nov 4, 2019
Merged

1.6.0#18
kpheasey merged 44 commits into
masterfrom
dev

Conversation

@kpheasey

@kpheasey kpheasey commented Nov 4, 2019

Copy link
Copy Markdown
Contributor

No description provided.

Jessie A. Young and others added 30 commits March 28, 2019 14:58
* The link was already there but I skipped over it on my first read.
This update makes the fact more prominent.
* I was testing to see if we wanted to move from AM Serializers to
fast_jsonapi but our API is not written according to the JSON:API spec
so, after converting one serializer over, I learned that this would not work for me.
* This update might save someone in my position the ~30 mins or so it
takes to bundle and write a serializer in the future. :)
Fix typo
* Test against Ruby 2.6

* Enforce bundler 1.17.3
* Allow relationship links to be declared as object method

* Relationship links note added to readme
* The link was already there but I skipped over it on my first read.
This update makes the fact more prominent.
* I was testing to see if we wanted to move from AM Serializers to
fast_jsonapi but our API is not written according to the JSON:API spec
so, after converting one serializer over, I learned that this would not work for me.
* This update might save someone in my position the ~30 mins or so it
takes to bundle and write a serializer in the future. :)
Fix typo
* Test against Ruby 2.6

* Enforce bundler 1.17.3
jopotts and others added 14 commits October 4, 2019 12:50
* Allow relationship links to be declared as object method

* Relationship links note added to readme
* Add params to set_id block arguments

Pull request #331 added a block to the ObjectSerializer.set_id class
method, which allows passing a block to the set_id method. Currently
this block takes only one argument `record`:

```
set_id do |record|
  "#{record.name.downcase}-#{record.id}"
end
```

This PR adds another argument `params` to the block:

```
set id do |record, params|
  params[:admin] ?  record.id : "#{record.name.downcase}-#{record.id}"
end
```

This customization can be useful in situation where we serve different
clients that may need different IDs. One nice side effect is also that
the `set_id` method has the same method signature as the `attribute`
method.

* Update the README
@kpheasey
kpheasey merged commit 6a08165 into master Nov 4, 2019
@stas
stas deleted the dev branch April 29, 2020 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.