Sha256: 2f09a46f6c67cde5bd02136a4eb00a03027c46b75e3d811a30ed848012af3f0c

Contents?: true

Size: 493 Bytes

Versions: 36

Compression:

Stored size: 493 Bytes

Contents

class AuthenticatedController < ApplicationController

  if Rails.version.to_i >= 5
    before_action :authenticate
  else
    before_filter :authenticate
  end

  def page
    if Rails.version.to_i >= 5
      render :plain => 'Action reached'
    else
      render :text => 'Action reached'
    end
  end

  private

  def authenticate
    authenticate_or_request_with_http_basic('Administration') do |username, password|
      username == 'user' && password == 'password'
    end
  end

end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
spreewald-4.6.3 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.6.2 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.6.1 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.6.0 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.5.1 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.5.0 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.4.4 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.4.3 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.4.2 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.4.1 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.4.0 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.3.6 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.3.5 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.3.4 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.3.3 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.3.2 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.2.3 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.2.2 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.1.2 tests/shared/app/controllers/authenticated_controller.rb
spreewald-4.1.1 tests/shared/app/controllers/authenticated_controller.rb