diff --git a/README b/README index 26569c6..8ddbff0 100644 --- a/README +++ b/README @@ -9,13 +9,13 @@ Made by Espen Antonsen * Read and writes EXIF * Organize in albums (events in iPhoto) * Combine albums in collections (albums in iPhoto) -* Upload multiple photos (using uploadify) +* Upload multiple photos * Tag photos. Can also tag albums (actually all photos in album is tagged) * User management with roles and permissions. == Requirements -Tested with Ruby 1.8.6 and Rails 2.3 +Rails 2.3 Software - FreeImage (required for Image_Science) diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 4e72940..4bbaab1 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -98,9 +98,10 @@ class PhotosController < ApplicationController end def update_multiple - @photos = Photo.find(params[:photo_ids]) - @photos.each do |photo| - photo.update_attributes!(params[:photo].reject { |k,v| v.blank? }) + @photos = params[:photos][:photo] + @photos.each do |photo_id| + photo = Photo.find( photo_id ) + photo.update_attributes!(params[:photos][:photo][photo_id].reject { |k,v| v.blank? }) end flash[:notice] = "Updated photos!" redirect_to photos_path diff --git a/app/views/photos/untouched.html.erb b/app/views/photos/untouched.html.erb index b8c0f5c..2919768 100644 --- a/app/views/photos/untouched.html.erb +++ b/app/views/photos/untouched.html.erb @@ -1,3 +1,13 @@ -
+<% f.fields_for photo do |p|%> + <%= p.text_field :title, :index => photo.id %> + <%= p.text_field :tags, :index => photo.id, :value => photo.tag_list %> +<% end%> +
+<% end%> +<%= f.submit "Submit" %>
+<% end %>