Sha256: 234610d8d8ccc2bbcd22f5bcbbe8703a131adc445f0cbb3f4f3829d1fb2d0634
Contents?: true
Size: 412 Bytes
Versions: 2
Compression:
Stored size: 412 Bytes
Contents
# encoding: utf-8 class PageComment < ActiveRecord::Base include PagesCore::Sweepable belongs_to :page, counter_cache: :comments_count attr_accessor :invalid_captcha def valid_captcha? (invalid_captcha) ? false : true end after_create do |page_comment| if page_comment.page && page_comment.valid? page_comment.page.update(last_comment_at: page_comment.created_at) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pages_core-3.4.3 | app/models/page_comment.rb |
pages_core-3.4.2 | app/models/page_comment.rb |