Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
5e4dcb4d
Commit
5e4dcb4d
authored
Oct 06, 2010
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't require storage module files directly.
parent
a9ac0f86
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
lib/paperclip.rb
+1
-0
lib/paperclip/attachment.rb
+3
-5
lib/paperclip/storage.rb
+2
-0
No files found.
lib/paperclip.rb
View file @
5e4dcb4d
...
@@ -37,6 +37,7 @@ require 'paperclip/thumbnail'
...
@@ -37,6 +37,7 @@ require 'paperclip/thumbnail'
require
'paperclip/interpolations'
require
'paperclip/interpolations'
require
'paperclip/style'
require
'paperclip/style'
require
'paperclip/attachment'
require
'paperclip/attachment'
require
'paperclip/storage'
require
'paperclip/callback_compatability'
require
'paperclip/callback_compatability'
require
'paperclip/command_line'
require
'paperclip/command_line'
require
'paperclip/railtie'
require
'paperclip/railtie'
...
...
lib/paperclip/attachment.rb
View file @
5e4dcb4d
...
@@ -275,13 +275,11 @@ module Paperclip
...
@@ -275,13 +275,11 @@ module Paperclip
def
initialize_storage
#:nodoc:
def
initialize_storage
#:nodoc:
storage_class_name
=
@storage
.
to_s
.
capitalize
storage_class_name
=
@storage
.
to_s
.
capitalize
storage_file_name
=
@storage
.
to_s
.
downcase
begin
begin
require
"paperclip/storage/
#{
storage_file_name
}
"
rescue
MissingSourceFile
raise
StorageMethodNotFound
,
"Cannot load 'paperclip/storage/
#{
storage_file_name
}
'"
end
@storage_module
=
Paperclip
::
Storage
.
const_get
(
storage_class_name
)
@storage_module
=
Paperclip
::
Storage
.
const_get
(
storage_class_name
)
rescue
NameError
raise
StorageMethodNotFound
,
"Cannot load storage module '
#{
storage_class_name
}
'"
end
self
.
extend
(
@storage_module
)
self
.
extend
(
@storage_module
)
end
end
...
...
lib/paperclip/storage.rb
View file @
5e4dcb4d
require
"paperclip/storage/filesystem"
require
"paperclip/storage/s3"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment