Code Monkey home page Code Monkey logo

Comments (4)

jonhue avatar jonhue commented on May 27, 2024

Please update to 2.1.0

from acts_as_favoritor.

RonWalker22 avatar RonWalker22 commented on May 27, 2024

@jonhue this bug was never fixed. I assume kumekay was referring to gem version 2.1.0 as 0.2.1 does not exist. I have fixed the issue here https://github.com/RonWalker22/acts_as_favoritor/commit/1690d144232616a8205c2af14baa3b3e183ba2ba#diff-d7faf63a7450a9f40a5e2cd1b0f6570d

While i was doing the fix, I noticed the remove_favorite method could be DRY'd up. So I also did that here https://github.com/RonWalker22/acts_as_favoritor/commit/779d2b7713e0d05980f7ab8897dd70e365cfd089

I had to put the commits on a different branch because I'm not sure how to toggle the cache on for certain tests. I tried ActsAsFavoritor.configuration.cache = true and it doesn't work. Let me know how I can do that, then I can create the pull requests.

from acts_as_favoritor.

jonhue avatar jonhue commented on May 27, 2024

@RonWalker22 Are you sure that ActsAsFavoritor.configuration.cache = true doesn't work? Where did you call it? This is the way it is supposed to work.

And yes, a lot of code in this gem could be DRY'd up. Thanks for tackling some of this!

from acts_as_favoritor.

RonWalker22 avatar RonWalker22 commented on May 27, 2024

@jonhue The config value changes, but the test fails when that is all that you change. So there's another bug somewhere.

So with

  1. config.cache = false in the initialize file
  2. a setup method in one of the test with ActsAsFavoritor.configuration.cache = true
  3. a teardown method inside same test with ActsAsFavoritor.configuration.cache = false

There are errors with that test. Try to do one of these kinds of tests and let me know what you get.

from acts_as_favoritor.

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.