Class: ActiveAdmin::Comments::Views::Comments
- Inherits:
-
Views::Panel
- Object
- Arbre::Component
- ActiveAdmin::Component
- Views::Panel
- ActiveAdmin::Comments::Views::Comments
- Defined in:
- lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
Methods inherited from Views::Panel
#add_child, #children?, #header_action
Instance Attribute Details
#resource ⇒ Object
Returns the value of attribute resource.
12 13 14 |
# File 'lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb', line 12 def resource @resource end |
Instance Method Details
#build(resource) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb', line 14 def build(resource) if (ActiveAdmin::Auth::READ, ActiveAdmin::Comment) @resource = resource @comments = .scope_collection(ActiveAdmin::Comment.find_for_resource_in_namespace(resource, active_admin_namespace.name).includes(:author).page(params[:page])) super(title, for: resource) build_comments end end |