Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json api #80

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Json api #80

wants to merge 9 commits into from

Conversation

amkirwan
Copy link

This pull request adds support for JsonApi to Roar-Rails.

This pull request currently uses the master branch for Roar because the last released gem v0.12.9 does not support JsonApi. However the current master branch of Roar does support JsonApi.

makes it easier to specify the URL of the resource with the
"href" key. For example:

module UserRepresenter
  include Roar::JSON::JsonApi

  type :user
  property :id
  property :username

  property :href

  def href
    user_url self
  end
end
@apotonick
Copy link
Member

Awesome work! I will release Roar 1.0 when I'm back in Oz next week, then we can hack roar-rails 1.0. Cool?

@amkirwan
Copy link
Author

sounds good. thanks.

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.

2 participants