Sha256: b6bb795c87f1b8b659428abf3a9f7c62ec341be35eb563dcabd713a585e7d1ed
Contents?: true
Size: 1.4 KB
Versions: 60
Compression:
Stored size: 1.4 KB
Contents
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %> <%%= f.error_notification %> <%- attributes.each do |attribute| -%> <%- next if [ "created_by", "updated_by" ].include? attribute.name -%> <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %> <%- if attribute.name.include?("picture") -%> <%%= f.input :<%= attribute.name %>_cache, as: :hidden %> <%%- if @<%= singular_table_name %>.<%= attribute.name %>? -%> <div class="form-group"> <div class="col-sm-offset-3 col-sm-9"> <%%= image_tag(@<%= singular_table_name %>.<%= attribute.name %>_url(:thumb)) %> <label for="<%= singular_table_name %>_remove_<%= attribute.name %>"> <%%= f.check_box :remove_<%= attribute.name %> %> <%%= t('headers.destroy', name: t('activerecord.attributes.<%= singular_table_name %>.<%= attribute.name %>')) %> </label> </div> </div> <%%- end -%> <%- end -%> <%- end -%> <%%= f.button :submit, class: 'btn btn-primary' %> <%%- if @<%= singular_table_name %>.new_record? -%> <%%= link_to t('actions.back.index'), <%= index_helper %>_path, class: 'btn btn-default' %> <%%- else -%> <%%= link_to t('actions.back.show'), @<%= singular_table_name %>, class: 'btn btn-default' %> <%%= link_to t('actions.back.index'), <%= index_helper %>_path, class: 'btn btn-default' %> <%%- end -%> <%% end %>
Version data entries
60 entries across 60 versions & 1 rubygems