Giter Site home page Giter Site logo

Comments (6)

qrush avatar qrush commented on July 28, 2024

This looks like the same issue as #42.

from paperclip.

hueyplong avatar hueyplong commented on July 28, 2024

Suggested fix seems to have worked for me, thank you.

from paperclip.

kmarsh avatar kmarsh commented on July 28, 2024

Yes, this fixes my report in #42, a diff:

diff --git a/vendor/plugins/paperclip/lib/paperclip/attachment.rb b/vendor/plugins/paperclip/lib/paperclip/attachment.rb
index b359105..0edd750 100644
--- a/vendor/plugins/paperclip/lib/paperclip/attachment.rb
+++ b/vendor/plugins/paperclip/lib/paperclip/attachment.rb
@@ -33,7 +33,7 @@ module Paperclip
       @url               = @url.call(self) if @url.is_a?(Proc)
       @path              = options[:path]
       @path              = @path.call(self) if @path.is_a?(Proc)
-      @styles            = options[:styles]
+      @styles            = options[:styles].clone
       @styles            = @styles.call(self) if @styles.is_a?(Proc)
       @default_url       = options[:default_url]
       @validations       = options[:validations]
@@ -41,7 +41,7 @@ module Paperclip
       @storage           = options[:storage]
       @whiny             = options[:whiny_thumbnails] || options[:whiny]
       @convert_options   = options[:convert_options] || {}
-      @processors        = options[:processors] || [:thumbnail]
+      @processors        = options[:processors].clone || [:thumbnail]
       @options           = options
       @queued_for_delete = []
       @queued_for_write  = {}

from paperclip.

baldwindavid avatar baldwindavid commented on July 28, 2024

This worked for me when changing...

- @styles            = options[:styles]
+ @styles           = options[:styles].clone

But I received an error with the clone on the processor.

from paperclip.

IvanUkhov avatar IvanUkhov commented on July 28, 2024

How do you call has_attached_file?

from paperclip.

sikachu avatar sikachu commented on July 28, 2024

I think this has been fixed in 7a42e65. Please reopen this ticket if you still facing a problem with this. Thank you.

from paperclip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.