Updated for Rails 4/Pages 3.4