Sha256: e14c32a412a493025cf5117b2e67d0512014a04a1a77247419236e1e8d3df49d
Contents?: true
Size: 552 Bytes
Versions: 10
Compression:
Stored size: 552 Bytes
Contents
module ForumPage def self.included(base) base.class_eval { has_comments include InstanceMethods } end module InstanceMethods def still_commentable? commentable? && !comments_closed? && (!commentable_period || Time.now - self.created_at < commentable_period) end def commentable_period Radiant::Config['forum.commentable_period'].to_i.days if Radiant::Config['forum.commentable_period'] end def locked? !still_commentable? end end end
Version data entries
10 entries across 10 versions & 1 rubygems