Sha256: 49a9829cbb073ee6b0ed4103c2be22d3cc47183465467e4138dc0c075c4b66db
Contents?: true
Size: 723 Bytes
Versions: 12
Compression:
Stored size: 723 Bytes
Contents
class Admin::DashboardController < Admin::ApplicationController layout 'admin/application' def index @admin_applications = Spud::Core.admin_applications.select do |admin_application| current_user.can_view_app?(admin_application) end end def switch if !params[:multisite_select].blank? if Spud::Core.multisite_config.select{|p| p[:site_id].to_i == params[:multisite_select].to_i}.blank? == false session[:admin_site] = params[:multisite_select].to_i else flash[:error] = "Site does not exist." end else session[:admin_site] = 0 end redirect_to(back_or_default(!request.referer.blank? ? request.referer : admin_root_path)) and return end end
Version data entries
12 entries across 12 versions & 1 rubygems