Sha256: 923a5c9fb3a034cf996e6bfa803c7499726d8bd14dd08bfcbc1734b85a6ffc04
Contents?: true
Size: 679 Bytes
Versions: 17
Compression:
Stored size: 679 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_method raise SecurityTransgression unless (user.nil? || user.is_commontator) 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
17 entries across 17 versions & 1 rubygems