Sha256: 3e0b5113e2cc125b8db00f94a8b58254c3c602ab2b146f90725733cf6df979fa
Contents?: true
Size: 644 Bytes
Versions: 2
Compression:
Stored size: 644 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) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
storytime-0.0.4 | app/controllers/storytime/dashboard_controller.rb |
storytime-0.0.2 | app/controllers/storytime/dashboard_controller.rb |