fix for photo urls before they are processed
This commit is contained in:
parent
5aa969559c
commit
8f9f24f383
2 changed files with 3 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ class Photo < Post
|
|||
end
|
||||
|
||||
def url(name = nil)
|
||||
if self.not_processed? || self.image.path.include? '.gif'
|
||||
if self.not_processed? || (!self.image.path.blank? && self.image.path.include?('.gif'))
|
||||
image.url
|
||||
elsif remote_photo_path
|
||||
name = name.to_s + '_' if name
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@ describe Photo do
|
|||
@fail_fixture_name = File.join(File.dirname(__FILE__), '..', 'fixtures', 'msg.xml')
|
||||
|
||||
@photo = @user.build_post(:photo, :user_file=> File.open(@fixture_name), :to => @aspect.id)
|
||||
@photo.processed = true
|
||||
@photo2 = @user.build_post(:photo, :user_file=> File.open(@fixture_name), :to => @aspect.id)
|
||||
@photo2.processed = true
|
||||
end
|
||||
|
||||
describe "protected attributes" do
|
||||
|
|
|
|||
Loading…
Reference in a new issue