Sha256: ca189c2093c68752dc6ce3540e81af1e0c8045ea779809e3842510dd1bf8f45b
Contents?: true
Size: 605 Bytes
Versions: 6
Compression:
Stored size: 605 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 = send 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
6 entries across 6 versions & 1 rubygems