Sha256: 47c4106950aa7c7073f095565a3ab15faa016ef2482b00df7f0b1a099adcc334

Contents?: true

Size: 1021 Bytes

Versions: 9

Compression:

Stored size: 1021 Bytes

Contents

<%= form_for(:profile, url: {action: action}, method: method) do |f| %>
  <% if @error.present? && @error.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@error.errors.count, "error") %> prohibited this user from being saved:</h2>

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

  <%= f.hidden_field :id, value: @profile.id  %>

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

  <div class="field">
    <%= f.label :description %><br>
    <%= f.text_field :description %>
  </div>

  <div class="field">

    <% @roles.each do |role|  %>
    <div>
      <input type="checkbox" name="profile[role_ids][]" value="<%= role.id %>" <%= checked="checked" if @profile.role_ids.include?(role.id) %> >
      <%= "#{role.name} - #{role.description}"%>
    </div>
    <% end %>

  </div>

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

<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arpa-0.1.0 lib/generators/arpa/templates/views/profiles/_form.html.erb
arpa-0.0.9 lib/generators/arpa/templates/views/profiles/_form.html.erb
arpa-0.0.8 lib/generators/arpa/templates/views/profiles/_form.html.erb
arpa-0.0.7 lib/generators/arpa/templates/views/profiles/_form.html.erb
arpa-0.0.6 lib/arpa/views/profiles/_form.html.erb
arpa-0.0.5 lib/arpa/views/profiles/_form.html.erb
arpa-0.0.4 lib/arpa/views/profiles/_form.html.erb
arpa-0.0.3 lib/arpa/views/profiles/_form.html.erb
arpa-0.0.2 lib/arpa/views/profiles/_form.html.erb