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
b9d9fc44
Commit
b9d9fc44
authored
May 20, 2010
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatic initialization for Rails 2 and Rails 3
parent
aa93daec
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
lib/paperclip.rb
+2
-3
lib/paperclip/railtie.rb
+20
-0
paperclip.gemspec
+1
-1
rails/init.rb
+2
-0
No files found.
lib/paperclip.rb
View file @
b9d9fc44
...
...
@@ -37,6 +37,7 @@ require 'paperclip/interpolations'
require
'paperclip/style'
require
'paperclip/attachment'
require
'paperclip/callback_compatability'
require
'paperclip/railtie'
if
defined?
(
Rails
.
root
)
&&
Rails
.
root
Dir
.
glob
(
File
.
join
(
File
.
expand_path
(
Rails
.
root
),
"lib"
,
"paperclip_processors"
,
"*.rb"
)).
each
do
|
processor
|
require
processor
...
...
@@ -47,7 +48,7 @@ end
# documentation for Paperclip::ClassMethods for more useful information.
module
Paperclip
VERSION
=
"2.3.2"
VERSION
=
"2.3.2
.beta1
"
class
<<
self
# Provides configurability to Paperclip. There are a number of options available, such as:
...
...
@@ -71,8 +72,6 @@ module Paperclip
end
def
configure
ActiveRecord
::
Base
.
send
(
:include
,
Paperclip
)
File
.
send
(
:include
,
Paperclip
::
Upfile
)
yield
(
self
)
if
block_given?
end
...
...
lib/paperclip/railtie.rb
0 → 100644
View file @
b9d9fc44
require
'paperclip'
module
Paperclip
if
defined?
Rails
::
Railtie
require
'rails'
class
Railtie
<
Rails
::
Railtie
config
.
after_initialize
do
Paperclip
::
Railtie
.
insert
end
end
end
class
Railtie
def
self
.
insert
ActiveRecord
::
Base
.
send
(
:include
,
Paperclip
)
File
.
send
(
:include
,
Paperclip
::
Upfile
)
end
end
end
paperclip.gemspec
View file @
b9d9fc44
$LOAD_PATH
<<
File
.
join
(
File
.
dirname
(
__FILE__
),
'lib'
)
require
'paperclip'
include_files
=
[
"README*"
,
"LICENSE"
,
"Rakefile"
,
"init.rb"
,
"{
generators,lib,tasks,test
,shoulda_macros}/**/*"
].
map
do
|
glob
|
include_files
=
[
"README*"
,
"LICENSE"
,
"Rakefile"
,
"init.rb"
,
"{
lib,tasks,test,rails,generators
,shoulda_macros}/**/*"
].
map
do
|
glob
|
Dir
[
glob
]
end
.
flatten
exclude_files
=
[
"test/s3.yml"
,
"test/debug.log"
,
"test/paperclip.db"
,
"test/doc"
,
"test/doc/*"
,
"test/pkg"
,
"test/pkg/*"
,
"test/tmp"
,
"test/tmp/*"
].
map
do
|
glob
|
...
...
rails/init.rb
0 → 100644
View file @
b9d9fc44
require
'paperclip/railtie'
Paperclip
::
Railtie
.
insert
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