Sha256: 2031ad26f73925187444559d957a384a809a626bc93e55475252ead98cb58a35

Contents?: true

Size: 844 Bytes

Versions: 3

Compression:

Stored size: 844 Bytes

Contents

<%= form_for(@project) do |f| %>
  <% if @project.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@project.errors.count, "error") %> prohibited this project from being saved:</h2>

      <ul>
      <% @project.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br>
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :content %><br>
    <%= f.text_area :content %>
  </div>

  <div class="field">
    <%= f.label :task_ids %><br>
    <%= f.text_field :task_ids, class: 'select2-multiple', data: {model: :Task, column: :status, init: f.object.tasks.map{|task| {id: task.id, text: task.status } } } %>
  </div>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
select2_helper-0.2.1 test/dummy/app/views/projects/_form.html.erb
select2_helper-0.2.0 test/dummy/app/views/projects/_form.html.erb
select2_helper-0.1.4 test/dummy/app/views/projects/_form.html.erb