Sha256: 8f2cd6a38d4c5b0feb33446da419397a7183e1efc4dcaf5587c8516df6209b2a
Contents?: true
Size: 873 Bytes
Versions: 10
Compression:
Stored size: 873 Bytes
Contents
<% first_attachments = true name_attribute = attributes.delete_if {|attr| attr.name == 'name'} # Assumes every content block should always have a name attribute -%><%%= f.input :name, as: :name %> <% for attribute in attributes -%> <%= field_tag = case attribute.type when :attachment "input :#{attribute.name}, as: :file_picker" when :attachments if first_attachments first_attachments = false "cms_attachment_manager" end when :category "association :#{attribute.name}, collection: categories_for('#{class_name.titleize}')" when :date "input :#{attribute.name}, as: :date_picker" when :html "input :#{attribute.name}, as: :text_editor" else "input :#{attribute.name}" end "<%= f.#{field_tag} %%>" %> <% end -%>
Version data entries
10 entries across 10 versions & 2 rubygems