Giter VIP home page Giter VIP logo

Comments (2)

petehamilton avatar petehamilton commented on September 27, 2024

Hi Ryan,

Thanks for making this an issue, I completely forgot I had to hack round that one!

I identified this issue while creating the gem and I'm afraid I had a bit of a brain blank on this one. It was causing some issues when trying to save up the hierarchy of models since the parent was incorrectly saying it hadn't been saved, which triggered errors preventing the child from saving as well and it all went wrong from there. You are right in thinking I just wrote my own version as a workaround but obviously this is less than ideal!

I attempted to simply override the method in my ActiveRecord class but obviously I should have been overriding in ActiveRecord::Persistence? If so I apologise for my oversight, it's been a tough few weeks of exams!

Thanks for your added change, if you fork and add it I will pull back in?
I am really busy until Friday but if you feel like contributing even further by implementing it correctly and simply changing the few references to my workaround method to the correct one then please go ahead and I will pull in your changes. It's little things like this that are left niggling and making it not quite complete.

Pete

from citier.

ryanchuleff avatar ryanchuleff commented on September 27, 2024

Hey Pete,

I found it in Altrabio's code:

def is_new_record(state)
#@new_record = state
@persisted = !state
end

Just make that change and your good to go. No other changes are required elsewhere in your gem.

-Ryan

from citier.

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.