heidi123p / adventures

mixnmatchadventures
0 stars 0 forks source link

can't update or create adventure with a photo #4

Open heidi123p opened 9 years ago

heidi123p commented 9 years ago

error area: def update respond_to do |format| if @adventure.update(adventure_params) format.html { redirect_to @adventure, notice: 'Adventure was successfully updated.' } format.json { head :no_content } else

Started PATCH "/adventures/5" for 127.0.0.1 at 2015-04-08 19:10:59 -0500 Processing by AdventuresController#update as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"S6bx4g5jr19XnKSnqNRDloy3uBR/bSBFNOQyh0aOJvI=", "adventure"=>{"name"=>"The Dock at Linden", "country"=>"United States of America", "description"=>"new beer garden", "picture"=>#<ActionDispatch::Http::UploadedFile:0x0000010228de78 @tempfile=#<Tempfile:/var/folders/yt/6qfgfqhd4w9csdkn3tvmxw_r0000gq/T/RackMultipart20150408-1566-1qfymy>, @original_filename="IMG_0890.JPG", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"adventure[picture]\"; filename=\"IMG_0890.JPG\"\r\nContent-Type: image/jpeg\r\n">, "time"=>"1", "budget"=>"40", "link"=>"", "more_info"=>"", "completed"=>"0", "submitted_by"=>"Testing"}, "commit"=>"Update Adventure", "id"=>"5"} Geokit is using the domain: localhost Adventure Load (0.3ms) SELECT "adventures".* FROM "adventures" WHERE "adventures"."id" = ? LIMIT 1 ["id", "5"] begin transaction (0.4ms) rollback transaction Completed 500 Internal Server Error in 130ms

Errno::ENOENT (No such file or directory - identify): app/controllers/adventures_controller.rb:43:in block in update' app/controllers/adventures_controller.rb:42:inupdate'

heidi123p commented 9 years ago

it's not image size

heidi123p commented 9 years ago

it's not in the if.present logic

heidi123p commented 9 years ago

or the show logic - existing photos display correctly on individual adventures