We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
class SerializablePost < JSONAPI::Serializable::Resource type 'posts' attributes :title, :body attribute :date do @object.created_at end belongs_to :author has_many :comments do data do @object.published_comments end link :related do @url_helpers.user_posts_url(@object.id) end meta do { count: @object.published_comments.count } end end link :self do @url_helpers.post_url(@object.id) end meta do { featured: true } end end
What do I pass to require to get that class loaded into ruby? I can't figure it out.
require
The text was updated successfully, but these errors were encountered:
Probably a bit late, but you can require 'jsonapi/serializable'
require 'jsonapi/serializable'
Sorry, something went wrong.
Why isn't this documented on the website?
@Xe Short answer is: this is an open source project, I built/maintain it on my free time, feel free to make a PR to https://github.com/jsonapi-rb/jsonapi-rb.github.io
No branches or pull requests
What do I pass to
require
to get that class loaded into ruby? I can't figure it out.The text was updated successfully, but these errors were encountered: