bookis-paperclip 2.3.3 → 2.3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +12 -1
- data/lib/paperclip/version.rb +1 -1
- metadata +3 -2
data/README.rdoc
CHANGED
@@ -20,7 +20,13 @@ more detailed options.
|
|
20
20
|
In your model:
|
21
21
|
|
22
22
|
class User < ActiveRecord::Base
|
23
|
-
|
23
|
+
has_attached_file :image, :styles => {
|
24
|
+
:full => "600x600>",
|
25
|
+
:thumb => "100x100>" },
|
26
|
+
:storage => :googlestorage,
|
27
|
+
:path => ":attachment/:id/:style.:extension",
|
28
|
+
:bucket => YOUR_BUCKET_NAME,
|
29
|
+
:google_storage_credentials => "#{RAILS_ROOT}/config/google_storage.yml"
|
24
30
|
end
|
25
31
|
|
26
32
|
In your migrations:
|
@@ -59,6 +65,11 @@ In your show view:
|
|
59
65
|
<%= image_tag @user.avatar.url(:medium) %>
|
60
66
|
<%= image_tag @user.avatar.url(:thumb) %>
|
61
67
|
|
68
|
+
Create the file confib/google_storage.yml to contain your credentials:
|
69
|
+
|
70
|
+
access_key_id: GOOGXXXXXXXXXXXX
|
71
|
+
secret_access_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
72
|
+
|
62
73
|
==Usage
|
63
74
|
|
64
75
|
The basics of paperclip are quite simple: Declare that your model has an
|
data/lib/paperclip/version.rb
CHANGED
metadata
CHANGED
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 2
|
7
7
|
- 3
|
8
8
|
- 3
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 2.3.3.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jon Yurek
|
@@ -101,7 +102,7 @@ dependencies:
|
|
101
102
|
version: "0"
|
102
103
|
type: :development
|
103
104
|
version_requirements: *id007
|
104
|
-
description: Easy upload management for ActiveRecord
|
105
|
+
description: Easy upload management for ActiveRecord w/Google Storage option
|
105
106
|
email: jyurek@thoughtbot.com
|
106
107
|
executables: []
|
107
108
|
|