Sha256: 75a75248e7f93614ac9e68933e0ccc67d91dcacae401600f828f4d3d34a7fac1

Contents?: true

Size: 683 Bytes

Versions: 17

Compression:

Stored size: 683 Bytes

Contents

# frozen_string_literal: true
module ActiveAdmin
  module Comments

    # Adds #active_admin_comments to the show page for use
    # and sets it up on the default main content
    module ShowPageHelper

      # Add admin comments to the main content if they are
      # turned on for the current resource
      def default_main_content
        super
        active_admin_comments if active_admin_config.comments?
      end

      # Display the comments for the resource. Same as calling
      # #active_admin_comments_for with the current resource
      def active_admin_comments(*args, &block)
        active_admin_comments_for(resource, *args, &block)
      end
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
activeadmin-3.2.5 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-3.2.4 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-3.2.3 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-3.2.2 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-3.2.1 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-3.2.0 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-3.1.0 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-3.0.0 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.14.0 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.13.1 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.13.0 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.12.0 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.11.2 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.11.1 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.11.0 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.10.1 lib/active_admin/orm/active_record/comments/show_page_helper.rb
activeadmin-2.10.0 lib/active_admin/orm/active_record/comments/show_page_helper.rb