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)) %>
        &nbsp;&nbsp;&nbsp;
        <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

Version Path
bootswatch_rails-3.3.7.8 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.7.7 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.7.6 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.7.5 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.7.4 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.7.3 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.7.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.7.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.7.0 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.6.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.6.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.5.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.5.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.4.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.2.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.1.2 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.1.1 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.1.0 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.0.11 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootswatch_rails-3.3.0.10 lib/generators/bootswatch_rails/install/templates/lib/templates/erb/scaffold/_form.html.erb