Skip to content

Commit

Permalink
missed the new folder of app/view/things
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Hoyt authored and Jonathan Hoyt committed Dec 12, 2008
1 parent ef57ef6 commit 2eb84b4
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/views/things/edit.html.erb
@@ -0,0 +1,16 @@
<h1>Editing attachment</h1>

<% form_for(@attachment) do |f| %>
<%= f.error_messages %>

<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.submit "Update" %>
</p>
<% end %>
<%= link_to 'Show', @attachment %> |
<%= link_to 'Back', attachments_path %>
20 changes: 20 additions & 0 deletions app/views/things/index.html.erb
@@ -0,0 +1,20 @@
<h1>Listing attachments</h1>

<table>
<tr>
<th>Name</th>
</tr>

<% for attachment in @attachments %>
<tr>
<td><%=h attachment.name %></td>
<td><%= link_to 'Show', attachment %></td>
<td><%= link_to 'Edit', edit_attachment_path(attachment) %></td>
<td><%= link_to 'Destroy', attachment, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>

<br />

<%= link_to 'New attachment', new_attachment_path %>
15 changes: 15 additions & 0 deletions app/views/things/new.html.erb
@@ -0,0 +1,15 @@
<h1>New attachment</h1>

<% form_for(@attachment) do |f| %>
<%= f.error_messages %>

<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.submit "Create" %>
</p>
<% end %>
<%= link_to 'Back', attachments_path %>
Empty file added app/views/things/show.html.erb
Empty file.

0 comments on commit 2eb84b4

Please sign in to comment.