Sha256: 9764f6d4c0d8863965fd1bc881b57708b1adb2a5a1ca173bb70729c0a297309b
Contents?: true
Size: 600 Bytes
Versions: 7
Compression:
Stored size: 600 Bytes
Contents
require 'commontator/shared_helper' require 'commontator/security_transgression' module Commontator module ControllerIncludes def self.included(base) base.helper Commontator::SharedHelper end protected def commontator_thread_show(commontable) user = Commontator.current_user_proc.call(self) thread = commontable.thread raise SecurityTransgression unless thread.can_be_read_by?(user) thread.mark_as_read_for(user) @commontator_thread_show = true end end end ActionController::Base.send :include, Commontator::ControllerIncludes
Version data entries
7 entries across 7 versions & 1 rubygems