Sha256: e056e443949b0027490e8f25e779e7cdae80126a32a4c7cefc26763b1b84c1a2

Contents?: true

Size: 551 Bytes

Versions: 18

Compression:

Stored size: 551 Bytes

Contents

module Dashing
  class ApplicationController < ActionController::Base

    before_filter :authentication_with_devise

    private

    def authentication_with_devise
      Dashing.config.devise_allowed_models.each do |model|
        self.send("authenticate_#{model.to_s}!")
      end
    end

    def check_accessibility
      auth_token = params.delete(:auth_token)
      if !Dashing.config.auth_token || auth_token == Dashing.config.auth_token
        true
      else
        render nothing: true, status: 401 and return
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dashing-rails-2.5.0 app/controllers/dashing/application_controller.rb
dashing-rails-2.4.5 app/controllers/dashing/application_controller.rb
dashing-rails-2.4.4 app/controllers/dashing/application_controller.rb
dashing-rails-2.4.3 app/controllers/dashing/application_controller.rb
dashing-rails-2.4.2 app/controllers/dashing/application_controller.rb
dashing-rails-2.4.1 app/controllers/dashing/application_controller.rb
dashing-rails-2.4.0 app/controllers/dashing/application_controller.rb
dashing-rails-2.3.2 app/controllers/dashing/application_controller.rb
dashing-rails-2.3.1 app/controllers/dashing/application_controller.rb
dashing-rails-2.3.0 app/controllers/dashing/application_controller.rb
dashing-rails-2.2.0 app/controllers/dashing/application_controller.rb
dashing-rails-2.1.1 app/controllers/dashing/application_controller.rb
dashing-rails-2.1.0 app/controllers/dashing/application_controller.rb
dashing-rails-2.0.2 app/controllers/dashing/application_controller.rb
dashing-rails-2.0.1 app/controllers/dashing/application_controller.rb
dashing-rails-2.0.0 app/controllers/dashing/application_controller.rb
dashing-rails-1.0.3 app/controllers/dashing/application_controller.rb
dashing-rails-1.0.2 app/controllers/dashing/application_controller.rb