mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-15 17:45:53 -07:00
chore: remove examples models and views
This commit is contained in:
parent
0f525cf2e8
commit
e97b39ec48
20 changed files with 37 additions and 501 deletions
|
|
@ -1,12 +0,0 @@
|
|||
<div id="<%= dom_id example %>">
|
||||
<p>
|
||||
<strong>Text:</strong>
|
||||
<%= example.text %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Body:</strong>
|
||||
<%= example.body %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<%= form_with(model: example) do |form| %>
|
||||
<% if example.errors.any? %>
|
||||
<div style="color: red">
|
||||
<h2><%= pluralize(example.errors.count, "error") %> prohibited this example from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% example.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<%= form.label :text, style: "display: block" %>
|
||||
<%= form.text_field :text %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :body, style: "display: block" %>
|
||||
<%= form.text_area :body %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<h1>Editing example</h1>
|
||||
|
||||
<%= render "form", example: @example %>
|
||||
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<%= link_to "Show this example", @example %> |
|
||||
<%= link_to "Back to examples", examples_path %>
|
||||
</div>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<p style="color: green"><%= notice %></p>
|
||||
|
||||
<h1>Examples</h1>
|
||||
|
||||
<div id="examples">
|
||||
<% @examples.each do |example| %>
|
||||
<%= render example %>
|
||||
<p>
|
||||
<%= link_to "Show this example", example %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= link_to "New example", new_example_path %>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<h1>New example</h1>
|
||||
|
||||
<%= render "form", example: @example %>
|
||||
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<%= link_to "Back to examples", examples_path %>
|
||||
</div>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<p style="color: green"><%= notice %></p>
|
||||
|
||||
<%= render @example %>
|
||||
|
||||
<div>
|
||||
<%= link_to "Edit this example", edit_example_path(@example) %> |
|
||||
<%= link_to "Back to examples", examples_path %>
|
||||
|
||||
<%= button_to "Destroy this example", @example, method: :delete %>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue