Skip to content
This repository was archived by the owner on Aug 1, 2018. It is now read-only.
This repository was archived by the owner on Aug 1, 2018. It is now read-only.

Not working with nested attributes #70

@Awatatah

Description

@Awatatah

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions