require "slimmer/headers"

class ApplicationController < ActionController::Base
  include Slimmer::Headers
  before_filter :set_analytics_headers

protected
  def set_analytics_headers
    set_slimmer_headers(format: "smart_answer")
  end
end

require "slimmer/headers"

class ApplicationController < ActionController::Base
  include Slimmer::Headers
  before_filter :set_analytics_headers

protected
  def set_analytics_headers
    set_slimmer_headers(format: "smart_answer")
  end

  def set_expiry(duration = 30.minutes)
    unless Rails.env.development?
      expires_in(duration, :public => true)
    end
  end
end

Add set_expiry method to ApplicationController
Add set_expiry method to ApplicationController

As we'll need to consistently (and easily) set cache control headers,
add a protected method to ApplicationController.
