Posting comment programatically in activeadmin
622 ワード
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
Author And Source
この問題について(Posting comment programatically in activeadmin), 我々は、より多くの情報をここで見つけました https://qiita.com/ku0522a/items/75104250fbfc1c34290d著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .