Sha256: edb940818e2def4a80a7ceea9884661c1e81f329e7e729f91fa7479f7f941cac
Contents?: true
Size: 742 Bytes
Versions: 2
Compression:
Stored size: 742 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 Commontator::SecurityTransgression unless thread.can_be_read_by?(user) thread.mark_as_read_for(user) @commontator_page = params[:page] || 1 @commontator_per_page = params[:per_page] || thread.config.comments_per_page @commontator_thread_show = true end end end ActionController::Base.send :include, Commontator::ControllerIncludes
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
commontator-4.6.1 | lib/commontator/controller_includes.rb |
commontator-4.6.0 | lib/commontator/controller_includes.rb |