Sha256: c7512cc679b34b8540d729fc980a194735364abce0d38b33ed3b29f306a1b408
Contents?: true
Size: 673 Bytes
Versions: 8
Compression:
Stored size: 673 Bytes
Contents
require_dependency "storytime/application_controller" module Storytime class DashboardController < ApplicationController before_action :authenticate_user! before_action :verify_storytime_user, unless: ->{ Storytime::Site.count == 0 } before_action :ensure_site, unless: ->{ params[:controller] == "storytime/dashboard/sites" } layout "storytime/dashboard" after_action :verify_authorized private def verify_storytime_user raise Pundit::NotAuthorizedError if current_user.storytime_role.nil? end def load_media @media = Media.order("created_at DESC").page(1).per(10) @large_gallery = false end end end
Version data entries
8 entries across 8 versions & 1 rubygems