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

Customise link property #1

Open
baphled opened this issue May 14, 2012 · 0 comments
Open

Customise link property #1

baphled opened this issue May 14, 2012 · 0 comments

Comments

@baphled
Copy link
Owner

baphled commented May 14, 2012

It would be nice if we could customise the link properties. This could be used to customise href's and add extra information.

We could do something like this:

AcceptableModel::Artist
  mime_types ['application/vnd.acme.artist-v1+json', 'application/vnd.acme.artist-v1+xml'] do      
    link do |artist|
      :rel => artist.relationship,
      :href => "/my-profile/artists/#{artist.id}",
      :accepted_types => versions
    end
  end
end
@ghost ghost assigned baphled May 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant