Code Monkey home page Code Monkey logo

Comments (3)

MichaelHoste avatar MichaelHoste commented on September 13, 2024

I tend to agree with you that it's not great to add methods to Object, and we're not proud of it. But it simplifies the localisation process and makes it work regardless of the context, and we like that.

So I would consider to add a disable_object_monkey_patching option and add a section in the docs to explain it, but I would not agree to make it the default behaviour.

Would it work for you?

Are you willing to create a pull request? I would be able to do it but not before a week or two.

from rails.

Systho avatar Systho commented on September 13, 2024

i suggested making it a new default only in a new major release because I understand that it would break a lot of (probably all) application. For the moment, having an option to opt-out of monkey patching is already a good step forward.

I'm definitely not comfortable enough with the codebase for making a PR, I just happened to inherit an app using _(...) everywhere and I when I found out how this voodoo trick was performed I decided to share my opinion with you :)

I'm not in any urgency for a fix neither, I have other , larger, problems to fix in that inherited codebase :)

from rails.

MichaelHoste avatar MichaelHoste commented on September 13, 2024

I added the option and documented it, a new gem version will be created tomorrow:

Thank you for the suggestion! :-)

from rails.

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.