Skip to content
Browse files

Removes super from ORM Classes from ticket #69

  • Loading branch information...
1 parent 4d81537 commit 4bb7079586a91a2fe3bb39ae43878c20ae115b62 @vtabary committed
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/backgrounder/orm/activerecord.rb
  2. +2 −2 lib/backgrounder/orm/mongoid.rb
View
4 lib/backgrounder/orm/activerecord.rb 100644 → 100755
@@ -13,7 +13,7 @@ def process_in_background(column, worker=::CarrierWave::Workers::ProcessAsset)
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def trigger_#{column}_background_processing?
- super && (#{column}_changed? || remote_#{column}_url.present?)
+ (process_#{column}_upload != true) && (#{column}_changed? || remote_#{column}_url.present?)
end
RUBY
end
@@ -23,7 +23,7 @@ def store_in_background(column, worker=::CarrierWave::Workers::StoreAsset)
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def trigger_#{column}_background_storage?
- super && (#{column}_changed? || remote_#{column}_url.present?)
+ (process_#{column}_upload != true) && (#{column}_changed? || remote_#{column}_url.present?)
end
RUBY
end
View
4 lib/backgrounder/orm/mongoid.rb 100644 → 100755
@@ -10,7 +10,7 @@ def process_in_background(column, worker=::CarrierWave::Workers::ProcessAsset)
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def trigger_#{column}_background_processing?
- super && (#{column}_changed? || remote_#{column}_url.present?)
+ (process_#{column}_upload != true) && (#{column}_changed? || remote_#{column}_url.present?)
end
RUBY
end
@@ -20,7 +20,7 @@ def store_in_background(column, worker=::CarrierWave::Workers::StoreAsset)
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def trigger_#{column}_background_storage?
- super && (#{column}_changed? || remote_#{column}_url.present?)
+ (process_#{column}_upload != true) && (#{column}_changed? || remote_#{column}_url.present?)
end
RUBY
end

0 comments on commit 4bb7079

Please sign in to comment.
Something went wrong with that request. Please try again.