Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip-qiniu
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-qiniu
Commits
531a133a
Commit
531a133a
authored
Sep 06, 2012
by
LI Daobing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add qiniu_image_path
parent
f08c8be4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
lib/paperclip-qiniu.rb
+1
-0
lib/paperclip/qiniu.rb
+1
-0
lib/paperclip/qiniu/action_view_extensions/qiniu_image_path.rb
+17
-0
No files found.
lib/paperclip-qiniu.rb
View file @
531a133a
require
"paperclip-qiniu/version"
require
"paperclip-qiniu/version"
require
'paperclip/storage/qiniu'
require
'paperclip/storage/qiniu'
require
'paperclip/qiniu/action_view_extensions/qiniu_image_path'
if
defined?
(
ActionView
)
lib/paperclip/qiniu.rb
0 → 100644
View file @
531a133a
require
'paperclip-qiniu'
lib/paperclip/qiniu/action_view_extensions/qiniu_image_path.rb
0 → 100644
View file @
531a133a
module
Paperclip
module
Qiniu
module
ActionViewExtensions
module
QiniuImagePath
def
qiniu_image_path
(
source
,
options
=
{})
thumbnail
=
options
.
delete
(
:thumbnail
)
res
=
source
res
+=
"?imageMogr"
if
thumbnail
res
+=
"/thumbnail/
#{
CGI
.
escape
thumbnail
}
"
if
thumbnail
res
.
html_safe
end
end
end
end
end
ActionView
::
Base
.
send
:include
,
Paperclip
::
Qiniu
::
ActionViewExtensions
::
QiniuImagePath
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