Generate Controller-Wide ETags [Rails 4 Countdown to 2013]

Posted on

One of the new features in Rails 4 is the ability to suffix controller-wide information to ETags. At the controller class level, you can set data by passing a block to the new `etag` macro style method. The etag method can be called multiple times, with each subsequent call suffixing the information to the response's ETag for easy client-side caching.

Read More