<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -70,22 +70,20 @@ module Fleximage
       # configure with a nice looking block.
       def acts_as_fleximage(options = {})
         
-        # Insert class methods
-        class_eval do
-          include Fleximage::Model::InstanceMethods
-          
-          # Call this class method just like you would call +operate+ in a view.
-          # The image transoformation in the provided block will be run on every uploaded image before its saved as the 
-          # master image.
-          def self.preprocess_image(&amp;block)
-            preprocess_image_operation(block)
-          end
-          
-          # Internal method to ask this class if it stores image in the DB.
-          def self.db_store?
-            columns.find do |col|
-              col.name == 'image_file_data'
-            end
+        # Include the necesary instance methods
+        include Fleximage::Model::InstanceMethods
+        
+        # Call this class method just like you would call +operate+ in a view.
+        # The image transoformation in the provided block will be run on every uploaded image before its saved as the 
+        # master image.
+        def self.preprocess_image(&amp;block)
+          preprocess_image_operation(block)
+        end
+        
+        # Internal method to ask this class if it stores image in the DB.
+        def self.db_store?
+          columns.find do |col|
+            col.name == 'image_file_data'
           end
         end
         
@@ -247,10 +245,8 @@ module Fleximage
           
           # Force a URL based file to have an original_filename
           eval &lt;&lt;-CODE
-            class &lt;&lt; file
-              def original_filename
-                &quot;#{file_url}&quot;
-              end
+            def file.original_filename
+              &quot;#{file_url}&quot;
             end
           CODE
           </diff>
      <filename>lib/fleximage/model.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,4 +25,11 @@ class FleximageFileUploadFromUrlTest &lt; Test::Unit::TestCase
   rescue SocketError
     print '!'
   end
+  
+  def test_should_have_an_original_filename
+    p = PhotoFile.new(:image_file_url =&gt; files(:web_photo))
+    assert_equal p.image_filename, files(:web_photo)
+  rescue SocketError
+    print '!'
+  end
 end</diff>
      <filename>test/unit/file_upload_from_url_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,4 +23,12 @@ class FleximageFileUploadToDbTest &lt; Test::Unit::TestCase
     assert_equal 1, p.errors.size
     assert_equal 'was not a readable image', p.errors.on(:image_file)
   end
+  
+  def test_should_retrieve_a_stored_image
+    id = PhotoDb.create(:image_file =&gt; files(:photo)).id
+    p = PhotoDb.find(id)
+    assert_kind_of Magick::Image, p.load_image
+    assert_equal 768,  p.load_image.columns
+    assert_equal 1024, p.load_image.rows
+  end
 end</diff>
      <filename>test/unit/file_upload_to_db.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a6c1bde3146fa8c92a6d1d4453378ed285edc8ce</id>
    </parent>
  </parents>
  <author>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </author>
  <url>http://github.com/Squeegy/fleximage/commit/81e51e7489ee4e397574a624d0eea432c675677d</url>
  <id>81e51e7489ee4e397574a624d0eea432c675677d</id>
  <committed-date>2008-05-21T11:59:05-07:00</committed-date>
  <authored-date>2008-05-21T11:59:05-07:00</authored-date>
  <message>Simplification of some unnecesary and noisy meta programming trickery.</message>
  <tree>bf65542a0fe3015425d2b3553a9c60e9bdfb1a72</tree>
  <committer>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </committer>
</commit>
