2011-06-21 14 views
16

पर एक टिप्पणी बॉक्स प्रदर्शित करना मैं ActiveAdmin का उपयोग कर रहा हूं। डिफ़ॉल्ट रूप से, टिप्पणी बॉक्स शो पृष्ठ के नीचे दिखाई देगा, लेकिन जब मैं इसे अनुकूलित करता हूं तो टिप्पणी बॉक्स ब्लॉक गायब हो जाता है।अनुकूलित ActiveAdmin दिखाएँ पृष्ठ

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

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

मैं शो पेज पर टिप्पणी बॉक्स को कैसे जोड़ सकता हूं?

उत्तर

33

मैं उत्तर :-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 

बस शो ब्लॉक के अंत में "active_admin_comments" जोड़ने मिला है। मुझे इसे demo site

के स्रोत कोड पर मिला
संबंधित मुद्दे