Posting comment programatically in activeadmin


seems no internal interface to post a comment but it can be done by just creating comment object directly.

      comment = ActiveAdmin::Comment.new(
        resource_id: id,
        resource_type: 'Post',
        namespace: active_admin_config.namespace.name                      
      )
      comment.author = current_active_admin_user                                 
      comment.body = "I am robot and proud <a href='http://robotandproud.com/'>check</a> this out."
      comment.save