Commit Graph

11 Commits

Author SHA1 Message Date
Piotr Sarnacki
43e20332cf Return removed_at and removed_by if the log was removed 2015-01-09 14:28:30 +01:00
Piotr Sarnacki
1b524071f4 Allow to handle settings collections 2014-04-01 12:00:06 +02:00
Piotr Sarnacki
1340fdb316 Allow to pass additional responders to respond_with 2013-05-08 14:11:02 +02:00
Piotr Sarnacki
f3ceee9b28 Always set content_type in responder 2013-03-25 16:39:37 +01:00
Piotr Sarnacki
61142c7cf6 Return 404 unless we can find API builder for resource
In order to protect us from rendering a resource simply converted to
json, without processing it with API data class, this commit changes
JSON responder behavior to render 404 if we can't find associated data
class. The only exception to that rule is when resource is already a
Hash, meaning that it was processed before - we sometimes return for
example simple Hash responses like { result: true }.

The Hash exception could allow to accidentally pass resource.as_json to
responder, but in travis-ci/travis-support@124b8b6 I disabled default
as_json method on AR::Base classes, so the risk of such mistake is
lowered.
2013-03-24 19:49:28 +01:00
Piotr Sarnacki
5345ef818e Use version from each of the accept headers, not only first one 2013-02-25 17:28:24 +01:00
Piotr Sarnacki
36783e6359 Handle chunked=true param in Accept header 2013-02-25 17:28:24 +01:00
Piotr Sarnacki
212eb6d9d3 Allow passing more than one mime type in Accept 2013-02-25 17:27:56 +01:00
Sven Fuchs
8abd6fa150 manual redirects and rewrite rules for supporting v1 style resources 2012-10-10 01:48:22 +02:00
Sven Fuchs
f8bd49e88b on 404 redirect for /owner/name paths on v1 2012-10-10 01:47:12 +02:00
Sven Fuchs
a7d72beefc move responders out of helpers 2012-10-09 20:51:09 +02:00