You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,19 @@
6
6
7
7
Simple yet powerful way to get your Rails API compliant with [JSON API](http://jsonapi.org).
8
8
9
-
`JSONAPI::Utils` (JU) is built on top of [JSONAPI::Resources](https://github.com/cerebris/jsonapi-resources) taking advantage of its resource-driven style and bringing an easy way to build modern JSON APIs with no or less learning curve.
9
+
`JSONAPI::Utils` (JU) is built on top of [JSONAPI::Resources](https://github.com/cerebris/jsonapi-resources)
10
+
taking advantage of its resource-driven style and bringing a set of helpers to easily build modern JSON APIs
11
+
with no or less learning curve.
10
12
11
13
After installing the gem and defining the resources/routes, it's as simple as calling a render helper:
12
14
13
15
```ruby
14
-
# app/controllers/users_controller.rb
15
-
defindex
16
-
jsonapi_render json:User.all
16
+
classUsersController < ActionController::Base
17
+
includeJSONAPI::Utils
18
+
19
+
defindex
20
+
jsonapi_render json:User.all
21
+
end
17
22
end
18
23
```
19
24
@@ -57,10 +62,10 @@ For Rails 4.x add this to your application's Gemfile:
57
62
gem 'jsonapi-utils', '~> 0.4.7'
58
63
```
59
64
60
-
For Rails 5, specify the beta version in the Gemfile:
65
+
For Rails 5, specify the `0.5.x` version in the Gemfile:
0 commit comments