Maybe I'm missing some thing but let's say I have the following layout where I have :text in a nested field using as: :html_editor. This does not work. It only works if it's not a nested attribute i.e. :name. Any ideas how to fix?
form do |f|
f.inputs "Section Details" do
f.semantic_errors
f.input :district, :collection => AbqDistricts::District.all.map {|u| [u.name, u.id]}, :include_blank => false
f.input :name
para "Do not use shortened urls e.g. 'http://bit.ly/1dNVPAW' for images. Only use full urls e.g. 'http://www.somewhere.com/someimage.jpg'", style: 'color:red;padding-left:10px;'
f.inputs 'List Items' do
f.has_many :list_items do |item|
item.input :item_type, as: :select, collection: ["", "list_item", "media", "text"], :include_blank => false, input_html: {onchange: "itemSelected(this)"}
item.input :text, as: :html_editor
item.input :link, input_html: {class: "item-select-type"}
end
end
end
f.actions
end
end
Maybe I'm missing some thing but let's say I have the following layout where I have
:text
in a nested field usingas: :html_editor
. This does not work. It only works if it's not a nested attribute i.e.:name
. Any ideas how to fix?