public
Rubygem
Description: A lightweight and opinionated but hackable library for attaching images to ActiveRecord models.
Homepage:
Clone URL: git://github.com/norman/has_image.git
More README tweaks.
norman (author)
Tue Jul 29 15:13:58 -0700 2008
commit  d11068dc150a4543f3997709f4a5f2a53db7b9c1
tree    a3d274208cbfe212cd22c3398dd43427e3fad760
parent  e66932198fbff9cd6ca2109d1c149009f0be341a
0
...
65
66
67
68
 
 
 
 
 
 
 
69
70
71
...
65
66
67
 
68
69
70
71
72
73
74
75
76
77
0
@@ -65,7 +65,13 @@ Image with some thumbnails:
0
   
0
 It also provides a view helper to make displaying the images extremely simple:
0
 
0
-  <%= image_tag_for(@photo, :thumb => :square) %>
0
+  <%= image_tag_for(@photo) # show the full-sized image %>
0
+  <%= image_tag_for(@photo, :thumb => :square) # show the square thumbnail %>
0
+
0
+The image_tag_for helper calls Rails' image_tag, so you can pass in all the 
0
+regular options to set the alt tag, CSS class, etc:
0
+  
0
+  <%= image_tag_for(@photo, :alt => "my cool picture", :class => "photo") %>
0
   
0
 Setting up forms for has_image is simple, too:
0
 

Comments