Sha256: d176fb49d4445274617817a75685c4ff8160c55964bfccdebe87f4504359057a

Contents?: true

Size: 1.17 KB

Versions: 29

Compression:

Stored size: 1.17 KB

Contents

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

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

  <div class="field" data-attr="title">
    <%= f.label :title %><br>
    <%= f.text_field :title %>
    <span class="errors" data-for="title"><%= f.object.errors[:title].first %></span>
    <br>
    <%= link_to "apply changes", '#', class: 'apply_changes none', data: {for: 'title'} %>
  </div>

  <div class="field" data-attr="text">
    <%= f.label :text %><br>
    <%= f.text_area :text %>
    <span class="errors" data-for="text"><%= f.object.errors[:text].first %></span>
    <br>
    <%= link_to "apply changes", '#', class: 'apply_changes none', data: {for: 'text'} %>
  </div>

  <div class="actions">
    <%= f.submit %>
    <span class="errors" data-for="base"><%= f.object.errors[:base].first %></span>
  </div>
<% end %>

<% if @article.persisted? %>
<section id="comments">
  <h3>Comments</h3>
</section>
<% end %>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
loco-rails-3.0.5 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-3.0.4 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-3.0.3 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.5.3 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.5.2 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-3.0.2 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-3.0.1 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.5.1 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.5.0 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.4.0 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.3.0 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-3.0.0 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.2.2 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.2.1 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.2.0 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.1.0 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-2.0.0 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-1.5.2 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-1.5.1 test/dummy/app/views/user/articles/_form.html.erb
loco-rails-1.5.0 test/dummy/app/views/user/articles/_form.html.erb