Giter Club home page Giter Club logo

Comments (4)

y9v avatar y9v commented on June 24, 2024

Hi @arabakevin!

Did you try to use the include directly, without using ActiveSupport?

NoBrainer::Document::ClassMethods.include Carrierwave::Base64::Adapter

from carrierwave-base64.

arabakevin avatar arabakevin commented on June 24, 2024

Hi @y9v ,
I've already found a workaround to use the library.
I use an initializers
in my config/initializers/carrierwave_base64.rb, we can see

NoBrainer::Document::ClassMethods.include Carrierwave::Base64::Adapter

It's the same than you propose.
But my issue is not to found a workaround but found a solution about the method on_load. This method not working with NoBrainer and I would like know if you have an idea about that.
Thanks.
Thanks again for your answwer.

from carrierwave-base64.

y9v avatar y9v commented on June 24, 2024

Ok, thanks for the update.

To be honest, I have no clue. I did a quick check, and couldn't find anything. I would try to come back to this issue later this week

from carrierwave-base64.

sangnuce avatar sangnuce commented on June 24, 2024

I think the problem is on nobrainer side.
it doesn't call the hook like active_record and mongoid do.
https://github.com/rails/rails/blob/99bd1d229ae72c4b8428d4f174a7fe35b5e20de4/activerecord/lib/active_record/base.rb#L333
https://github.com/mongodb/mongoid/blob/eaa6d26467e7fb15d46867bed676d4e59317e738/lib/mongoid/document.rb#L344
https://api.rubyonrails.org/classes/ActiveSupport/LazyLoadHooks.html

from carrierwave-base64.

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.