Giter Site home page Giter Site logo

Comments (4)

rmm5t avatar rmm5t commented on August 28, 2024

Thanks for the report. And just to confirm, this was working as expected with Mongoid 3.0?

from carrierwave-mongoid.

khelll avatar khelll commented on August 28, 2024

Not sure if that's Mongoid 3.1 problem or carrierwave mongoid itself. Today I did bundle update and the test above failed.

from carrierwave-mongoid.

rmm5t avatar rmm5t commented on August 28, 2024

I was going to try to write a failing test, but I first just tried this on a project of mine. I cannot reproduce the same problem.

Mongoid 3.0.17 and Mongoid 3.0.22:

>> Mongoid::VERSION
=> "3.0.21"
>> i.file
=> import/file/5116bcdcc2e4dc4647000005/alpha_import.csv
>> i.file.present?
=> true
>> i.file.blank?
=> false
>> i.file.nil?
=> false

Mongoid 3.1.0

>> Mongoid::VERSION
=> "3.1.0"
>> i.file
=> import/file/5116bcdcc2e4dc4647000005/alpha_import.csv
>> i.file.present?
=> true
>> i.file.blank?
=> false
>> i.file.nil?
=> false

@khelll If you could distill this down to a failing spec and submit a pull-request, I'd be happy to look into a potential fix.

Also, what does your Carrierwave configuration look like?

from carrierwave-mongoid.

khelll avatar khelll commented on August 28, 2024

Sorry for the messed up ticket! After digging more into it, I found out that the uploads folder was missing(what a coincidence after updating the gems!).
The test above seems reasonable now as the .present? seems to be looking for the physical file, not the field value. A little bit new to my taste but it explains everything.
I'm closing this ticket now.

Thanks @rmm5t

from carrierwave-mongoid.

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.