Sha256: d0a3d56926ccebe345da28c2918bd5573d6117d45ef95bbdec7c67ed1f6e151b

Contents?: true

Size: 376 Bytes

Versions: 11

Compression:

Stored size: 376 Bytes

Contents

class PagesCms::ApplicationController < ApplicationController

  def selected_account
    if session[:current_account].nil? || PagesCms::Account.exists?(session[:current_account]) == false
      flash[:danger] = 'Select a site to edit'
      redirect_to admin_accounts_path
    end
  end

  def current_account
    PagesCms::Account.find(session[:current_account])
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pages_cms-2.2.3 app/controllers/pages_cms/application_controller.rb
pages_cms-2.2.2 app/controllers/pages_cms/application_controller.rb
pages_cms-2.2.1 app/controllers/pages_cms/application_controller.rb
pages_cms-2.1.1 app/controllers/pages_cms/application_controller.rb
pages_cms-2.1.0 app/controllers/pages_cms/application_controller.rb
pages_cms-2.0.1 app/controllers/pages_cms/application_controller.rb
pages_cms-2.0.0 app/controllers/pages_cms/application_controller.rb
pages_cms-1.2.3 app/controllers/pages_cms/application_controller.rb
pages_cms-1.2.2 app/controllers/pages_cms/application_controller.rb
pages_cms-1.2.1 app/controllers/pages_cms/application_controller.rb
pages_cms-1.2.0 app/controllers/pages_cms/application_controller.rb