2011-06-21 32 views
16

Tôi đang sử dụng ActiveAdmin. Theo mặc định, hộp nhận xét sẽ xuất hiện ở cuối trang hiển thị, nhưng sau khi tôi tùy chỉnh, hộp chú thích sẽ biến mất.Hiển thị hộp nhận xét trên trang Hiển thị ActiveAdmin tùy chỉnh

ActiveAdmin.register Book do 
    scope :all, :default => true 
    scope :publish 

    show do 
    attributes_table :name, :description, :owner, :company, :publish, :publisher 
    end 
end 

Làm cách nào để thêm hộp nhận xét trở lại trang chương trình?

Trả lời

33

tôi đã trả lời :-P

ActiveAdmin.register Book do 
    scope :all, :default => true 
    scope :publish 

    show do 
    attributes_table :name, :description, :owner, :company, :publish, :publisher 
    active_admin_comments # Add this line for comment block 
    end 
end 

Chỉ cần thêm "active_admin_comments" ở phần cuối của chương trình khối. Tôi tìm thấy mã nguồn trên demo site

Các vấn đề liên quan