action text with active admin not working properly

自作多情 提交于 2020-04-30 08:48:55

问题


I am using active admin and active text with rails 6 when I inserted image inside rich_text_area using active admin (f.rich_text_area) then it appears inside text area immediately but when I tried to save the same then in log file I found img tag is not included in parameter. so when I press edit button of article then no image appears.

I have successfully install active_storage and active_text please find below details

model/article.rb

class Article < ApplicationRecord
  belongs_to :category
  has_rich_text :body
end

admin/blogs.rb

form do |f|
    f.inputs do
      f.input :title
      f.rich_text_area :body
    end
    f.actions
  end

adding image to text_area and after saving the data will produce log :-

Parameters: {"authenticity_token"=>"xxxxxxxxxxxxxx", "article"=>{"title"=>"bccvb",  "body"=>"<div></div>"}

Is there any correction or solution available.

来源:https://stackoverflow.com/questions/60707150/action-text-with-active-admin-not-working-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!