Sha256: bd384aa7b1de2729850cb7bf2192ef84f2f42f2e0fffa296d1feb0946ee82c1d

Contents?: true

Size: 571 Bytes

Versions: 18

Compression:

Stored size: 571 Bytes

Contents

module Spina
  class ApplicationController < ActionController::Base
    include ApplicationHelper

    private

    def current_ability
      @current_ability ||= Ability.new(current_user)
    end

    def current_theme
      @current_theme = ::Spina.themes.first
    end
    helper_method :current_theme

    def current_user
      @current_user ||= User.where(id: session[:user_id]).first if session[:user_id]
    end
    helper_method :current_user

    def current_account
      @current_account ||= Account.first
    end
    helper_method :current_account
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
spina-0.6.28 app/controllers/spina/application_controller.rb
spina-0.6.27 app/controllers/spina/application_controller.rb
spina-0.6.26 app/controllers/spina/application_controller.rb
spina-0.6.25 app/controllers/spina/application_controller.rb
spina-0.6.24 app/controllers/spina/application_controller.rb
spina-0.6.23 app/controllers/spina/application_controller.rb
spina-0.6.22 app/controllers/spina/application_controller.rb
spina-0.6.21 app/controllers/spina/application_controller.rb
spina-0.6.20 app/controllers/spina/application_controller.rb
spina-0.6.19 app/controllers/spina/application_controller.rb
spina-0.6.18 app/controllers/spina/application_controller.rb
spina-0.6.17 app/controllers/spina/application_controller.rb
spina-0.6.16 app/controllers/spina/application_controller.rb
spina-0.6.15 app/controllers/spina/application_controller.rb
spina-0.6.14 app/controllers/spina/application_controller.rb
spina-0.6.13 app/controllers/spina/application_controller.rb
spina-0.6.12 app/controllers/spina/application_controller.rb
spina-0.6.11 app/controllers/spina/application_controller.rb