From b8a2e8ecdfcc7564cce7a6265b7a99791ee8a4e2 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 4 Aug 2010 16:13:32 -0700 Subject: [PATCH] RS, IZ; Fix Photo.instantiate, make photo url include spec a little more specific --- app/models/photo.rb | 1 + gpg/diaspora-test/trustdb.gpg | Bin 1680 -> 1680 bytes spec/models/photo_spec.rb | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/photo.rb b/app/models/photo.rb index a3143ae86..e57e2f78d 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -23,6 +23,7 @@ class Photo < Post photo = Photo.new(params) photo.image.store! image_file photo.save + photo end after_save :log_save_inspection diff --git a/gpg/diaspora-test/trustdb.gpg b/gpg/diaspora-test/trustdb.gpg index 1a5e3988f2dcc4572560e923f40f241ab551feca..5bbf2835afb623d9680cdf401eff2f0121fd1bfc 100644 GIT binary patch delta 28 jcmbQhJAqe#F})z2nVFH5k%581C-PI(#6aX~c+TO9`I delta 28 jcmbQhJAqe#F})z2nVFH5k%581C-TG5iGku9)ic=uU1J9^ diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index dceed3a78..3920d83b2 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -59,7 +59,7 @@ describe Photo do @photo.image.store! File.open(@fixture_name) puts @photo.image.url(:thumb_medium) @photo.image.url.include?(@fixture_filename).should be false - @photo.image.url(:thumb_medium).include?(@fixture_filename).should be false + @photo.image.url(:thumb_medium).include?("/" + @fixture_filename).should be false end describe 'non-image files' do