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