Sha256: 154a2cbef49be50b270b67a0a8dc816bd66da1c56276dd101522e027d8ebebc1

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

<% # This 'unless' can be removed if :name is no longer assumed to be a default attribute.
   unless attributes.find {|attr| attr.name == 'name'}
%><%%= f.cms_text_field :name %>
<% end %>
<% for attribute in attributes -%>
<%%= f.cms_<%= 
case attribute.type
when :attachment
  "file_field :#{attribute.name}_file, :label => \"File\""
when :category
  "drop_down :category_id, categories_for('#{class_name.titleize}').map{|c| [c.path, c.id]}"
when :date, :datetime
  "date_picker :#{attribute.name}"
when :html
  "text_editor :#{attribute.name}"
else
  "#{attribute.field_type} :#{attribute.name}"
end 
-%> %>
<% end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
browsercms-3.0.0 rails_generators/content_block/templates/_form.html.erb