Sha256: 7917ac0378293c3bf18f51922e0a0f9438bd38c0cdd64170229075801fbf9a0a

Contents?: true

Size: 747 Bytes

Versions: 11

Compression:

Stored size: 747 Bytes

Contents

# encoding: utf-8
module TestServer
  class ApplicationController < ActionController::Base
    layout 'application'

    include TestServer::WebHelper

    # Prevent CSRF attacks by raising an exception.
    # For APIs, you may want to use :null_session instead.
    protect_from_forgery with: :exception

    before_filter :configure_caching
    before_filter :set_params

    private

    def permitted_params
      @permitted_params ||= PermittedParams.new(params)
    end

    def set_params
      self.params = permitted_params.params_for_controller controller_name, action_name, default_params
    end

    helper_method :permitted_params

    def default_params
      {
        base64: false,
        gzip: false,
      }
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
test_server-0.5.2 app/controllers/test_server/application_controller.rb
test_server-0.5.1 app/controllers/test_server/application_controller.rb
test_server-0.5.0 app/controllers/test_server/application_controller.rb
test_server-0.4.1 app/controllers/test_server/application_controller.rb
test_server-0.4.0 app/controllers/test_server/application_controller.rb
test_server-0.3.7 app/controllers/test_server/application_controller.rb
test_server-0.3.6 app/controllers/test_server/application_controller.rb
test_server-0.3.5 app/controllers/test_server/application_controller.rb
test_server-0.3.4 app/controllers/test_server/application_controller.rb
test_server-0.3.2 app/controllers/test_server/application_controller.rb
test_server-0.3.1 app/controllers/test_server/application_controller.rb