Permalink
Browse files

Add Upgrading note

  • Loading branch information...
1 parent 8a758c2 commit b3a63edb1705f75673fdb41f60691b0cc5065697 @sikachu sikachu committed Mar 23, 2012
Showing with 18 additions and 0 deletions.
  1. +14 −0 UPGRADING
  2. +4 −0 paperclip.gemspec
View
@@ -0,0 +1,14 @@
+##################################################
+# NOTE FOR UPGRADING FROM PRE-3.0 VERSION #
+##################################################
+
+Paperclip 3.0 introduces a non-backward compatible change in your attachment
+path. This will help to prevent attachment name clashes when you have
+multiple attachments with the same name. If you didn't alter your
+attachment's path and are using Paperclip's default, you'll have to add
+`:path` and `:url` to your `has_attached_file` definition. For example:
+
+ has_attached_file :avatar,
+ :path => ":rails_root/public/system/:attachment/:id/:style/:filename",
+ :url => "/system/:attachment/:id/:style/:filename"
+
View
@@ -18,6 +18,10 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
+ if File.exists?('UPGRADING')
+ s.post_install_message = File.read("UPGRADING")
+ end
+
s.requirements << "ImageMagick"
s.add_dependency('activerecord', '>= 3.0.0')

0 comments on commit b3a63ed

Please sign in to comment.