Sha256: 8a0c4a1e4281760e2effbc380ebaab7373468d9966cb309b0625dd3c8563af01

Contents?: true

Size: 431 Bytes

Versions: 13

Compression:

Stored size: 431 Bytes

Contents

class AutoError::ApplicationController < ::ApplicationController
  include AutoError::ApplicationHelper
  helper :all

  protected

  def ensure_authenticated
    @h = AutoError::HelperContext.new( env )

    # raise unless the auth_with helper returns a truthy value
    # this way we can let the user access their own auth logic
    unless AutoError::Config.auth_with.(@h)
      raise AutoError::Errors::Denied
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
auto_error-0.0.18 app/controllers/auto_error/application_controller.rb
auto_error-0.0.16 app/controllers/auto_error/application_controller.rb
auto_error-0.0.15 app/controllers/auto_error/application_controller.rb
auto_error-0.0.14 app/controllers/auto_error/application_controller.rb
auto_error-0.0.13 app/controllers/auto_error/application_controller.rb
auto_error-0.0.12 app/controllers/auto_error/application_controller.rb
auto_error-0.0.10 app/controllers/auto_error/application_controller.rb
auto_error-0.0.9 app/controllers/auto_error/application_controller.rb
auto_error-0.0.8 app/controllers/auto_error/application_controller.rb
auto_error-0.0.7 app/controllers/auto_error/application_controller.rb
auto_error-0.0.6 app/controllers/auto_error/application_controller.rb
auto_error-0.0.5 app/controllers/auto_error/application_controller.rb
auto_error-0.0.4 app/controllers/auto_error/application_controller.rb