% content_for :title do %>
<%= link_to "My Albums", albums_path %>
<% end %>
<% if @album.present? %>
<%= @album.title %>
<% end %>
<% @images.each do |image| %>
-
<%= link_to image_tag(image.image.thumb('200x200#').url),
image_path(image), class: :image %>
<%= link_to 'Delete', image_path(image),
method: :delete, data: { confirm: 'Are you sure?' } %>
<% end %>
-
<%= form_for(
@images.new,
html: {
class: "images__upload-form",
data: {"uploads-target": "form"}
}
) do |f| %>
<%= f.hidden_field :user_id %>
<%= f.hidden_field :album_id %>
<%= f.file_field(
:images,
class: "images__upload-input",
multiple: true,
accept: "image/*",
data: {"uploads-target": "fileField"}
) %>
<% end %>