Sha256: 4a4ae273a918aaeb18f5ac9c7d06184c8457eff3866f01165cc17255589d4a4c

Contents?: true

Size: 381 Bytes

Versions: 1

Compression:

Stored size: 381 Bytes

Contents

ActiveSupport::Reloader.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_comments-0.1.0 config/initializers/article.rb