added delayed_paperclip
This commit is contained in:
parent
678e03deed
commit
b378a03afa
1
Gemfile
1
Gemfile
|
@ -31,6 +31,7 @@ gem 'font-awesome-rails', '~> 4.2.0.0'
|
|||
gem 'rails-assets-growl'
|
||||
gem 'jcrop-rails-v2'
|
||||
gem "paperclip", "~> 4.2"
|
||||
gem 'delayed_paperclip'
|
||||
|
||||
gem 'ruby-progressbar'
|
||||
|
||||
|
|
|
@ -84,6 +84,8 @@ GEM
|
|||
crass (1.0.1)
|
||||
daemons (1.1.9)
|
||||
database_cleaner (1.3.0)
|
||||
delayed_paperclip (2.9.0)
|
||||
paperclip (>= 3.3)
|
||||
devise (3.4.1)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
|
@ -349,6 +351,7 @@ DEPENDENCIES
|
|||
capybara
|
||||
coffee-rails (~> 4.1.0)
|
||||
database_cleaner
|
||||
delayed_paperclip
|
||||
devise
|
||||
factory_girl_rails
|
||||
faker
|
||||
|
|
|
@ -40,8 +40,10 @@ class User < ActiveRecord::Base
|
|||
|
||||
# validates :website, format: { with: WEBSITE_REGEX }
|
||||
|
||||
has_attached_file :profile_picture, styles: { medium: "256x256>", thumb: "80x80>" }, default_url: "/images/:style/no_avatar.png"
|
||||
has_attached_file :profile_picture, styles: { medium: "256x256>", thumb: "80x80>" },
|
||||
default_url: "/images/:style/no_avatar.png", use_timestamp: false
|
||||
validates_attachment_content_type :profile_picture, :content_type => /\Aimage\/.*\Z/
|
||||
process_in_background :profile_picture
|
||||
|
||||
before_save do
|
||||
self.display_name = 'WRYYYYYYYY' if display_name == 'Dio Brando'
|
||||
|
|
|
@ -6,4 +6,5 @@ staging:
|
|||
production:
|
||||
:concurrency: 25
|
||||
:queues:
|
||||
- share
|
||||
- share
|
||||
- paperclip
|
|
@ -0,0 +1,5 @@
|
|||
class AddProfilePictureProcessingToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :profile_picture_processing, :boolean
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20141229085904) do
|
||||
ActiveRecord::Schema.define(version: 20141229105013) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -163,6 +163,7 @@ ActiveRecord::Schema.define(version: 20141229085904) do
|
|||
t.string "profile_picture_content_type"
|
||||
t.integer "profile_picture_file_size"
|
||||
t.datetime "profile_picture_updated_at"
|
||||
t.boolean "profile_picture_processing"
|
||||
end
|
||||
|
||||
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
|
||||
|
|
Loading…
Reference in New Issue