diff --git a/app/views/things/edit.html.erb b/app/views/things/edit.html.erb new file mode 100644 index 0000000..efa7fb7 --- /dev/null +++ b/app/views/things/edit.html.erb @@ -0,0 +1,16 @@ +

Editing attachment

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

+ <%= f.label :name %>
+ <%= f.text_field :name %> +

+

+ <%= f.submit "Update" %> +

+<% end %> + +<%= link_to 'Show', @attachment %> | +<%= link_to 'Back', attachments_path %> diff --git a/app/views/things/index.html.erb b/app/views/things/index.html.erb new file mode 100644 index 0000000..4f878ae --- /dev/null +++ b/app/views/things/index.html.erb @@ -0,0 +1,20 @@ +

Listing attachments

+ + + + + + +<% for attachment in @attachments %> + + + + + + +<% end %> +
Name
<%=h attachment.name %><%= link_to 'Show', attachment %><%= link_to 'Edit', edit_attachment_path(attachment) %><%= link_to 'Destroy', attachment, :confirm => 'Are you sure?', :method => :delete %>
+ +
+ +<%= link_to 'New attachment', new_attachment_path %> diff --git a/app/views/things/new.html.erb b/app/views/things/new.html.erb new file mode 100644 index 0000000..4ff4ab4 --- /dev/null +++ b/app/views/things/new.html.erb @@ -0,0 +1,15 @@ +

New attachment

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

+ <%= f.label :name %>
+ <%= f.text_field :name %> +

+

+ <%= f.submit "Create" %> +

+<% end %> + +<%= link_to 'Back', attachments_path %> diff --git a/app/views/things/show.html.erb b/app/views/things/show.html.erb new file mode 100644 index 0000000..e69de29