<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -21,10 +21,14 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
   rdoc.rdoc_files.include('lib/**/*.rb')
 end
 
+desc 'Update documentation on website'
+task :sync_docs =&gt; 'rdoc' do
+  `rsync -ave ssh doc/ dev@dev.thoughtbot.com:/home/dev/www/dev.thoughtbot.com/paperclip`
+end
+
 desc 'Clean up files.'
 task :clean do |t|
   FileUtils.rm_rf &quot;doc&quot;
-  FileUtils.rm_rf &quot;test/public&quot;
   FileUtils.rm_rf &quot;tmp&quot;
   FileUtils.rm &quot;test/debug.log&quot; rescue nil
   FileUtils.rm &quot;test/paperclip.db&quot; rescue nil</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -80,10 +80,10 @@ module Paperclip
     #   Paperclip::Attachment#interpolate for more information on variable interpolaton.
     #     :url =&gt; &quot;/:attachment/:id/:style_:basename:extension&quot;
     #     :url =&gt; &quot;http://some.other.host/stuff/:class/:id_:extension&quot;
-    # * +missing_url+: The URL that will be returned if there is no attachment assigned. 
+    # * +default_url+: The URL that will be returned if there is no attachment assigned. 
     #   This field is interpolated just as the url is. The default value is 
     #   &quot;/:class/:attachment/missing_:style.png&quot;
-    #     has_attached_file :avatar, :missing_url =&gt; &quot;/images/default_:style_avatar.png&quot;
+    #     has_attached_file :avatar, :default_url =&gt; &quot;/images/default_:style_avatar.png&quot;
     #     User.new.avatar_url(:small) # =&gt; &quot;/images/default_small_avatar.png&quot;
     # * +styles+: A hash of thumbnail styles and their geometries. You can find more about 
     #   geometry strings at the ImageMagick website </diff>
      <filename>lib/paperclip.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,7 +58,7 @@ module Paperclip
     # This is not recommended if you don't need the security, however, for
     # performance reasons.
     def url style = nil
-      interpolate(@url, style) || interpolate(@default_url, style)
+      @file ? interpolate(@url, style) : interpolate(@default_url, style)
     end
 
     # Alias to +url+</diff>
      <filename>lib/paperclip/attachment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,12 @@ class AttachmentTest &lt; Test::Unit::TestCase
       @file = File.new(File.join(File.dirname(__FILE__), &quot;fixtures&quot;, &quot;5k.png&quot;))
     end
 
+    should &quot;return its default_url when no file assigned&quot; do
+      assert @attachment.file.nil?
+      assert_equal &quot;/tests/original/missing.png&quot;, @attachment.url
+      assert_equal &quot;/tests/blah/missing.png&quot;, @attachment.url(:blah)
+    end
+
     context &quot;when expecting three styles&quot; do
       setup do
         @attachment = Paperclip::Attachment.new(:test, @instance, @default_options.merge({
@@ -40,6 +46,12 @@ class AttachmentTest &lt; Test::Unit::TestCase
           @attachment.assign(@file)
         end
 
+        should &quot;return the real url&quot; do
+          assert @attachment.file
+          assert_equal &quot;/tests/41/original/5k.png&quot;, @attachment.url
+          assert_equal &quot;/tests/41/blah/5k.png&quot;, @attachment.url(:blah)
+        end
+
         should &quot;be dirty&quot; do
           assert @attachment.dirty?
         end</diff>
      <filename>test/test_attachment.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>30c2be58004f515c1a75413ae224c5f55c433643</id>
    </parent>
  </parents>
  <author>
    <name>jyurek</name>
    <email>jyurek@7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa</email>
  </author>
  <url>http://github.com/thoughtbot/paperclip/commit/e35fa9eb8eb78a975c16b3a4a7e04113dd5c76a1</url>
  <id>e35fa9eb8eb78a975c16b3a4a7e04113dd5c76a1</id>
  <committed-date>2008-03-20T08:58:47-07:00</committed-date>
  <authored-date>2008-03-20T08:58:47-07:00</authored-date>
  <message>Fixed bug with default_url

git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@400 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa</message>
  <tree>f5e5e46c88ed32b8e2e0c9d05e859e6a7d5ef626</tree>
  <committer>
    <name>jyurek</name>
    <email>jyurek@7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa</email>
  </committer>
</commit>
