magiclabs/alchemy_cms — pull request #498 by tvdeyen (2014-03-19 22:05:16+00:00)
Title: Fixes pages_controller etag and last-modified headers.

The current implementation always delivers the same etag, regardless of the logged in state of a user.
If a user is logged in and has sufficient rights to edit a page (aka. an author), the menu bar will be displayed while browsing the site. The problem is, that this will be cached by http caches like varnish and rack/cache.

This fix changes the etag so it reflects the current users state.

Also this fix ensures that a last-modified header gets returned, even if published_at was never set, aka, it's nil. In this case it will return updated_at.