Sha256: 8808fec2d97b244b99d32d0e9a3f141e082592ab068f879ba9ccb30f02405345

Contents?: true

Size: 361 Bytes

Versions: 1

Compression:

Stored size: 361 Bytes

Contents

class SectionFormBuilder < ExtensibleFormBuilder
  before(:section, :submit_buttons) do |f|
    unless @section.type == 'Forum'
      render :partial => 'admin/sections/comments_settings', :locals => { :f => f }
    end
  end

  ActiveSupport::Reloader.to_prepare do
    Section.class_eval do
      def accept_comments?
        true
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adva_comments-0.1.0 config/initializers/section.rb