如何以activeadmin形式显示自定义html
我想在表单中显示带有一些动态值的 h1 ,
我怎么能得到它?
exsisting_categories = ""
ActsAsTaggableOn::Tag.all.each do |t|
exsisting_categories += "#{t.name}, "
end
=============> %h1 = exsisting_categories
f.inputs "Exsiting Categories" do
text_area_tag :exsisting_categories, exsisting_categories, :input_html => { :disabled => true }
end
答案 0 :(得分:0)
你可以做到
exsisting_categories = ""
ActsAsTaggableOn::Tag.all.each do |t|
exsisting_categories += "#{t.name}, "
end
h1 exsisting_categories