1.0.0.rc8
Pre-release
Pre-release
_This version has a bug on the caching of the /api endpoint (the caching is forever instead of for 5 seconds); please use 1.0.0.rc9 instead._
Potentially breaking changes (if advanced usage)
- The
Documentsclass was renamedResponse, for consistency with other kits; since Ruby is not strongly typed, most likely this won't change anything for you.
New features
- All calls but the /api endpoint were already cached out-of-the-box (with a LRU cache). The /api endpoint should not be cached "eternally", since it is where you application goes to check if what is being served is up-to-date. However, now, for high traffic peaks, a new cache was added to the /api endpoint's call, to make sure it does not get called more than once every few seconds.
- Expose the ID field on the Ref (for the release's ID)
Response.pageandResponse.results_per_pagewere aliased asResponse.current_pageandResults.limit_value, so that you can use the Kaminari gem out-of-the-box. Basically, if you're using Rails 3 or 4, you can:- add
gem 'kaminari'to your Gemfile, and runbundle install - then, when you get a
@responseobject from prismic.io, you can build a whole pagination for it with a single line in any of your views:<%= paginate @documents %>
- add