Restful::Jsonapi
A temporary monkeypatch for JSONAPI support, both in request payload, and serializing the type without a namespace.
Installation
Add this line to your application's Gemfile:
gem 'restful-jsonapi'
And then execute:
$ bundle
Or install it yourself as:
$ gem install restful-jsonapi
Usage
class MovieTypesController < ApplicationController
...
private
def movie_type_params
restify_param(:movie_type).require(:movie_type).permit(
:id,
:name,
created_user: [
:id,
:email
]
end
end
Contributing
- Fork it ( https://github.com/[my-github-username]/restful-jsonapi/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request