Sha256: 406293704341c1cdd56cf86add7c325e3cc7c5fc17133f4c9cb0febeee746276

Contents?: true

Size: 1.12 KB

Versions: 10

Compression:

Stored size: 1.12 KB

Contents

<a class="close-reveal-modal" aria-label="Close">&#215;</a>

<h2 id="modalTitle">Edit</h2>

<%= simple_form_for @record, as: 'record', url: table_update_path(@table, pk_id: @record[@table.primary_key]), remote: true, method: :put, html: {class: 'vertical_form'} do |form| %>
    <div class='scrollable_form'>
      <% @record.class.columns.each do |column| %>
        <% name = column.name %>
        <% next if name == @table.primary_key %>

        <% options = { label: name } %>
        <% options[:include_blank] = true if column.type.to_s =~ /time|date/ %>
        <% options[:as] = :text if column.type.to_s =~ /tsvector/ %>
        <% if column.type.to_s =~ /text/ %>
          <% options[:input_html] = {} %>
          <% options[:input_html][:rows] = 4 %>
          <% options[:input_html][:cols] = 80 %>
        <% end %>

        <%= form.input name, options %>
      <% end %>
    </div>
    <%= form.submit 'SAVE', class: 'button small' %>
    <a class='close' onclick="$('#system_modal').foundation('reveal', 'close');$">Close</a>
<% end %>

<span class="radius warning label">NOTE: Update will happen without any validations.</span>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rails_db-2.4.0 app/views/rails_db/tables/_edit.html.erb
rails_db-2.3.1 app/views/rails_db/tables/_edit.html.erb
rails_db-2.3.0 app/views/rails_db/tables/_edit.html.erb
rails_db-2.2.1 app/views/rails_db/tables/_edit.html.erb
rails_db-2.2.0 app/views/rails_db/tables/_edit.html.erb
rails_db-2.1.1 app/views/rails_db/tables/_edit.html.erb
rails_db-2.1.0 app/views/rails_db/tables/_edit.html.erb
rails_db-2.0.6 app/views/rails_db/tables/_edit.html.erb
rails_db-2.0.5 app/views/rails_db/tables/_edit.html.erb
rails_db-2.0.4 app/views/rails_db/tables/_edit.html.erb