From dc6505aff51b8889b47cf3f7da8fd6cea075b5ad Mon Sep 17 00:00:00 2001 From: Gerry Gleason Date: Sat, 22 Sep 2012 20:26:18 -0500 Subject: [PATCH] Supply blank comment on no image --- lib/packs/type/file_and_image_pack.rb | 2 +- lib/wagn/model/attach.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/packs/type/file_and_image_pack.rb b/lib/packs/type/file_and_image_pack.rb index 9b5ddd6c8..33a52e573 100644 --- a/lib/packs/type/file_and_image_pack.rb +++ b/lib/packs/type/file_and_image_pack.rb @@ -2,7 +2,7 @@ class Wagn::Renderer define_view :core, :type=>'image' do |args| handle_source args do |source| - image_tag source + source == 'missing' ? "" : image_tag(source) end end diff --git a/lib/wagn/model/attach.rb b/lib/wagn/model/attach.rb index e0cff7507..668c64379 100644 --- a/lib/wagn/model/attach.rb +++ b/lib/wagn/model/attach.rb @@ -94,6 +94,7 @@ def before_post_attach def self.included(base) base.class_eval do has_attached_file :attach, :preserve_files=>true, + :default_url => "missing", :url => ":base_url/:basename-:size:revision_id.:extension", :path => ":local/:card_id/:size:revision_id.:extension", :styles => { :icon => '16x16#', :small => '75x75',