public
Fork of Squeegy/fleximage
Description: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.
Homepage: http://fleximage.rubyforge.org
Clone URL: git://github.com/austinfromboston/fleximage.git
corrected a typo for local assigns support, added a has_image? check for 
instance_variables before running load_image, so multiple 
fleximage-enabled models don't interfere with each other
Austin Putman (author)
Fri Apr 11 22:02:46 -0700 2008
commit  53b69395ed5cda54263912ec67aeb22d3c174e76
tree    3b3722681d1a7f800cdcf9539c2b82f78d568973
parent  1407d1678608cfa351f82a12cf5efc84cc52c1ad
...
25
26
27
28
 
29
30
31
32
33
 
34
35
36
...
60
61
62
63
64
 
...
25
26
27
 
28
29
30
31
32
 
33
34
35
36
...
60
61
62
 
63
64
0
@@ -25,12 +25,12 @@ module Fleximage
0
         # inject assigns into instance variables
0
         assigns.each do |key, value|
0
           instance_variable_set "@#{key}", value
0
- value.load_image if value.respond_to?(:load_image)
0
+ value.load_image if value.respond_to?(:load_image) and value.has_image?
0
         end
0
         
0
         # inject local assigns into reader methods
0
         local_assigns.each do |key, value|
0
- class << self; self; end.send(:define_method, key) { val }
0
+ class << self; self; end.send(:define_method, key) { value }
0
         end
0
         
0
         #execute the template
0
@@ -60,4 +60,4 @@ module Fleximage
0
       GC.start
0
     end
0
   end
0
-end
0
\ No newline at end of file
0
+end

Comments

    No one has commented yet.