Sha256: f329283b82aa4c7210b2d8a573a659020a40e068c002d21e684d73a07d240e12
Contents?: true
Size: 476 Bytes
Versions: 19
Compression:
Stored size: 476 Bytes
Contents
module Mumuki::Laboratory::Controllers::Content extend ActiveSupport::Concern included do before_action :validate_used_here!, only: :show end # ensures contents are in current organization's path def validate_used_here! #TODO refactor subject logic (e.g. we can't move validate_accessible! here because ExerciseSolutionsController does not declare a subject) raise Mumuki::Laboratory::NotFoundError unless subject&.used_in?(Organization.current) end end
Version data entries
19 entries across 19 versions & 1 rubygems