Sha256: 7f56bf8b929287deb388d253228e88638de8b0541e498ffed4b6cb23c751abfe

Contents?: true

Size: 430 Bytes

Versions: 39

Compression:

Stored size: 430 Bytes

Contents

class ApplicationController < ActionController::Base
  before_action :setup_user

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

  def setup_user
    @current_user = User.new
    @current_user.admin = true
    # if params[:admin]
    #   @current_user.admin = true
    # end
  end

  def current_user
    @current_user
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
pulitzer-0.15.31 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.30 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.29 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.28 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.27 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.26 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.25 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.24 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.23 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.22 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.21 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.20 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.19 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.18 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.17 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.16 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.15 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.14 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.13 spec/dummy/app/controllers/application_controller.rb
pulitzer-0.15.12 spec/dummy/app/controllers/application_controller.rb