Sha256: 097a766c6aab38af4a38d8a421be34c0e424da5f1df622315f66bebbc58c4d06

Contents?: true

Size: 333 Bytes

Versions: 10

Compression:

Stored size: 333 Bytes

Contents

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

  helper_method :current_user

  def current_user
    @current_user ||= User.find(session[:user_id]) if session[:user_id]
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
neutral-0.0.10 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.9 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.8 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.7 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.6 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.5 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.4 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.3 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.2 spec/dummy/app/controllers/application_controller.rb
neutral-0.0.1 spec/dummy/app/controllers/application_controller.rb