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

Not working with nested attributes #70

Open
Awatatah opened this issue Feb 6, 2017 · 0 comments
Open

Not working with nested attributes #70

Awatatah opened this issue Feb 6, 2017 · 0 comments

Comments

@Awatatah
Copy link

Awatatah commented Feb 6, 2017

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant