Sha256: 85a43f611375b30ba869383e61cd696fd67f573e1a4913bfd9028242d8bb1c9b

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

ActionDispatch::Callbacks.to_prepare do
  Article.class_eval do
    def accept_comments?
      published? && (comment_age > -1) && (comment_age == 0 || comments_expired_at > Time.zone.now)
    end
  end
end

class ArticleFormBuilder < ExtensibleFormBuilder
  after(:article, :filter) do |f|
    render :partial => 'admin/articles/comments_settings', :locals => { :f => f }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adva-0.0.1 adva_comments/config/initializers/article.rb