Sha256: 35d8a8aea016926fd3154c0c988cf64f5b753179c64b780f567e87c4295c2fe4

Contents?: true

Size: 316 Bytes

Versions: 1

Compression:

Stored size: 316 Bytes

Contents

class ApplicationController < ActionController::Base
  helper_method :current_user

  private

  # helper method for getting the current signed in user
  def current_user
    begin
      @current_user || User.find(session[:user_id]) if session[:user_id]
    rescue
      nil
    end
  end
  protect_from_forgery
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dailycred-0.1.36 dummy/app/controllers/application_controller.rb