Skip to content

Commit b3a63ed

Browse files
committed
Add Upgrading note
1 parent 8a758c2 commit b3a63ed

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

UPGRADING

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
##################################################
2+
# NOTE FOR UPGRADING FROM PRE-3.0 VERSION #
3+
##################################################
4+
5+
Paperclip 3.0 introduces a non-backward compatible change in your attachment
6+
path. This will help to prevent attachment name clashes when you have
7+
multiple attachments with the same name. If you didn't alter your
8+
attachment's path and are using Paperclip's default, you'll have to add
9+
`:path` and `:url` to your `has_attached_file` definition. For example:
10+
11+
has_attached_file :avatar,
12+
:path => ":rails_root/public/system/:attachment/:id/:style/:filename",
13+
:url => "/system/:attachment/:id/:style/:filename"
14+

paperclip.gemspec

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Gem::Specification.new do |s|
1818
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
1919
s.require_paths = ["lib"]
2020

21+
if File.exists?('UPGRADING')
22+
s.post_install_message = File.read("UPGRADING")
23+
end
24+
2125
s.requirements << "ImageMagick"
2226

2327
s.add_dependency('activerecord', '>= 3.0.0')

0 commit comments

Comments
 (0)