title: Optional parameters for Rails Image Helper
body: <p>In my current Rails (Rails 2.3.5, Ruby 1.8.7) app, if I would like to be able to define a helper like:</p>
  
  <pre><code>  def product_image_tag(product, size=nil)
      html = '' 
      pi = product.product_images.first.filename
      pi = "products/#{pi}"
      pa = product.product_images.first.alt_text
  
      if pi.nil? || pi.empty?
        html = image_tag("http://placehold.it/200x200", :size =&gt; "200x200")
      else
        html = image_tag(pi, size)
      end
  
      html
  
    end
  </code></pre>
  
  <p>...and then call it from a view with either:</p>
  
  <pre><code>&lt;%= product_image_tag(p) %&gt;
  </code></pre>
  
  <p>...or:</p>
  
  <pre><code>&lt;%= product_image_tag(p, :size =&gt; 20x20) %&gt;
  </code></pre>
  
  <p>In other words, I'd like to be able to have this helper method take an optional size parameter. What would be the best way to go about this?</p>