Ruby on rails 3 ActiveAdmin Formtasic DSL在嵌套集中添加链接

Ruby on rails 3 ActiveAdmin Formtasic DSL在嵌套集中添加链接,ruby-on-rails-3,formtastic,activeadmin,Ruby On Rails 3,Formtastic,Activeadmin,我有ActiveAdmin+Rails3.1,一切正常 除了一件事,我的产品中有一个嵌套模型。 一旦我添加了一个图像,我就无法将其从我的产品中删除!!! 我能找到的唯一方法是在表单中添加自定义链接 指向将删除此关联的自定义操作 form do |f| f.inputs "Options:" do f.input:price f.input:about f.has_many :pictures do |son| #I NEED A LINK_TO R

我有ActiveAdmin+Rails3.1,一切正常 除了一件事,我的产品中有一个嵌套模型。 一旦我添加了一个图像,我就无法将其从我的产品中删除!!! 我能找到的唯一方法是在表单中添加自定义链接 指向将删除此关联的自定义操作

form do |f|
    f.inputs "Options:" do
      f.input:price
      f.input:about

      f.has_many :pictures do |son|
 #I NEED A LINK_TO REMOVE THIS ASSOCIATION INSIDE OF HERE
      son.input :photo, :as => :file, :label => "pic",:hint => son.object.nil? ? son.template.content_tag(:span, "No Image Yet") : son.template.image_tag(son.object.photo.url(:thumb))
    end

    f.buttons
end

但是找不到出路。似乎没有这样的方法来输出自定义html

用脏钩解决:

 :label =>(son.object.new_record? ? "Изображение" : son.template.link_to