Sha256: 552e318b5ae9a3cdd8c92c15db50222407d4531c9c1c38332e25b3d4f5f266c8

Contents?: true

Size: 542 Bytes

Versions: 4

Compression:

Stored size: 542 Bytes

Contents

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

  # This just makes the reports reload in development

  before_action :require_reports if Rails.env.development?

  def authenticate!
    render :plain => 'forbidden' unless cookies[ :login ]
  end

  def authorize!
  end

  def require_reports
    Dir[Rails.root + 'app/reports/**/*.rb'].each { |path| require_dependency path }
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
report_cat-5.0.3 spec/dummy/app/controllers/application_controller.rb
report_cat-5.0.2 spec/dummy/app/controllers/application_controller.rb
report_cat-5.0.1 spec/dummy/app/controllers/application_controller.rb
report_cat-5.0.0 spec/dummy/app/controllers/application_controller.rb