Skip to content

Commit

Permalink
⚠️ instance variable @versions, @Format, @file, @filename, @cache_id …
Browse files Browse the repository at this point in the history
…not initialized
  • Loading branch information
amatsuda committed Feb 13, 2018
1 parent 7f11d38 commit d34e121
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/carrierwave/processing/mini_magick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ module MiniMagick
e.message << " (You may need to install the mini_magick gem)"
raise e
end

prepend Module.new {
def initialize(*)
super
@format = nil
end
}
end

module ClassMethods
Expand Down
7 changes: 7 additions & 0 deletions lib/carrierwave/processing/rmagick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ module RMagick
e.message << " (You may need to install the rmagick gem)"
raise e
end

prepend Module.new {
def initialize(*)
super
@format = nil
end
}
end

module ClassMethods
Expand Down
9 changes: 9 additions & 0 deletions lib/carrierwave/uploader/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ module Store
include CarrierWave::Uploader::Configuration
include CarrierWave::Uploader::Cache

included do
prepend Module.new {
def initialize(*)
super
@file, @filename, @cache_id = nil
end
}
end

##
# Override this in your Uploader to change the filename.
#
Expand Down
7 changes: 7 additions & 0 deletions lib/carrierwave/uploader/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ module Versions
after :remove, :remove_versions!
after :retrieve_from_cache, :retrieve_versions_from_cache!
after :retrieve_from_store, :retrieve_versions_from_store!

prepend Module.new {
def initialize(*)
super
@versions = nil
end
}
end

module ClassMethods
Expand Down

0 comments on commit d34e121

Please sign in to comment.