Sha256: 0f627aa6ea0957617ce7b728a28b2a7b4b0dbff3607fccd8283dbe96787d55f9
Contents?: true
Size: 463 Bytes
Versions: 1
Compression:
Stored size: 463 Bytes
Contents
class Manifest::ManifestController < ApplicationController before_filter :authorize layout 'manifest/manifest' private def current_editor @current_editor ||= Editor.find(session[:editor_id]) if session[:editor_id] end helper_method :current_editor def authorize redirect_to manifest_login_url if current_editor.nil? end def authorize_admin redirect_to manifest_path, alert: 'Admins only' unless current_editor.admin? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
manifest-rails-0.1.0 | app/controllers/manifest/manifest_controller.rb |