lib/backgrounder/orm/base.rb in carrierwave_backgrounder-0.0.3 vs lib/backgrounder/orm/base.rb in carrierwave_backgrounder-0.0.4
- old
+ new
@@ -66,18 +66,18 @@
# class User < ActiveRecord::Base
# mount_uploader :avatar, AvatarUploader
# store_in_background :avatar
# end
#
- # The above adds a User#process_<column> method which can be used at times when you want to bypass
+ # The above adds a User#process_<column>_upload method which can be used at times when you want to bypass
# background storage and processing.
#
- # @user.process_avatar = true
+ # @user.process_avatar_upload = true
# @user.save
#
# You can also pass in your own workers using the second argument in case you need other things done
- # durring processing.
+ # during processing.
#
# class User < ActiveRecord::Base
# mount_uploader :avatar, AvatarUploader
# store_in_background :avatar, CustomWorker
# end
@@ -87,10 +87,10 @@
class_eval <<-RUBY, __FILE__, __LINE__ + 1
attr_accessor :process_#{column}_upload
def write_#{column}_identifier
- super() and return if process_upload
+ super() and return if process_#{column}_upload
self.#{column}_tmp = _mounter(:#{column}).cache_name
end
def store_#{column}!
super() if process_#{column}_upload