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
Fixed ability to set the path for storing image files.
norman (author)
Mon Aug 18 08:31:00 -0700 2008
commit  51e75df3898c12e79e748ed11ce30cbafd113a97
tree    d3c19683f7ce895a9d560a15baf0ee16aae5b321
parent  a333fb7c1957dbfdc6e4902bb5d8b782a5207f16
...
 
 
 
1
2
3
...
1
2
3
4
5
6
0
@@ -1,3 +1,6 @@
0
+2008-08-18 Norman Clarke <norman@randomba.org>
0
+  * Fixed ability to set the path for storing image files.
0
+
0
 2008-08-1 Adrian Mugnolo <adrian@randomba.org>
0
   * Improved partitioned path handling to avoid collisions when the id is
0
     very high, which can happen if you use db:fixtures:load.
...
1
2
3
4
 
 
5
6
7
...
1
2
 
 
3
4
5
6
7
0
@@ -1,7 +1,7 @@
0
 Gem::Specification.new do |s|
0
   s.name = "has_image"
0
-  s.version = "0.1.7"
0
-  s.date = "2008-08-01"
0
+  s.version = "0.1.8"
0
+  s.date = "2008-08-18"
0
   s.add_dependency('mini_magick', '>= 1.2.3')
0
   s.rubyforge_project = 'has-image'  
0
   s.summary = "Lets you attach images with thumbnails to active record models."
...
90
91
92
93
 
94
95
96
...
90
91
92
 
93
94
95
96
0
@@ -90,7 +90,7 @@ module HasImage
0
     #
0
     #   /photos/0000/0001/3er0zs.jpg
0
     def public_path_for(object, thumbnail = nil)
0
-      filesystem_path_for(object, thumbnail).gsub(options[:base_path], '')
0
+      filesystem_path_for(object, thumbnail).gsub(/\A.*public/, '')
0
     end
0
     
0
     # Deletes the images and directory that contains them.

Comments