-
Notifications
You must be signed in to change notification settings - Fork 2
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
Documentation for Rails? #6
Comments
Returning Enumerable from a controller should kick in content-negotiation to get the appropriate form. This is used (through sinatra-linked data) in the Linter, for example. SPARQL has a similar mechanism for doing content negotiation. Certainly the README could use improvement, and this probably isn't a common way for Rails developers to do content negotiation. Specs should describe how it's done in rack-linkeddata, though. Contributions welcome. |
When returning an enumerable from e.g. Several other things I've tried (e.g. |
I'm able to hack around the ActionView issue by adding an empty Returning an Enumerable leads to an empty response body; but I haven't been able to spot where the enumerable disappears. |
It's possible that Rails has changed enough since this was introduced that it either needs to be modified, or is no longer relevant for use with Rails. A more natural way in Rails is to use I use this in the context of Sinatra, where things may be a bit simpler. |
The README.md says using this with Rails should look like:
This works fine to get the middleware into the Rails stack, but it's not at all clear what to do from there. Returning an
RDF::Enumerable
from a controller action doesn't do the trick, and I can't find any good recommendations about how to give an arbitrary object as a response body. Is there a right way to do this we can get into the README?The text was updated successfully, but these errors were encountered: