<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,4 +4,8 @@ class Product &lt; ActiveRecord::Base
   has_attached_file :photo, :styles =&gt; { :small =&gt; &quot;150x150&gt;&quot; },
                     :url  =&gt; &quot;/assets/products/:id/:style/:basename.:extension&quot;,
                     :path =&gt; &quot;:rails_root/public/assets/products/:id/:style/:basename.:extension&quot;
+  
+  validates_attachment_presence :photo
+  validates_attachment_size :photo, :less_than =&gt; 5.megabytes
+  validates_attachment_content_type :photo, :content_type =&gt; ['image/jpeg', 'image/png']
 end</diff>
      <filename>episode-134/store/app/models/product.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fa71c4a680796cbc77de507ff086b2ffd59b68a5</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bates</name>
    <email>ryan@railscasts.com</email>
  </author>
  <url>http://github.com/ryanb/railscasts-episodes/commit/c33a49bd0978c7a1f917c11c096e4bddf8e8121a</url>
  <id>c33a49bd0978c7a1f917c11c096e4bddf8e8121a</id>
  <committed-date>2008-11-01T21:12:56-07:00</committed-date>
  <authored-date>2008-11-01T21:12:56-07:00</authored-date>
  <message>adding validations to product in episode 134</message>
  <tree>5641236380e059db626685e63b0905eabf8e341f</tree>
  <committer>
    <name>Ryan Bates</name>
    <email>ryan@railscasts.com</email>
  </committer>
</commit>
