Coder Social home page Coder Social logo

Comments (2)

waynerobinson avatar waynerobinson commented on July 18, 2024

Hi Kieran

That seems reasonable to me. Do you mind submitting as a pull request?

Also, happy to look at a pull request with a merge implementation.

Cheers

Wayne

On 5 September 2011 13:51, KieranP <
[email protected]>wrote:

Xeroizer 0.3.5

https://github.com/waynerobinson/xeroizer/blob/master/lib/xeroizer/record/base.rb#L53

invoice[:date] = Date.today
=> nil

The problem it seems, when compared to the working build method, is that
[]= is forgetting to convert the attribute setter string to a symbol.

If we change the line

self.send("#{attribute}=", value)

to

self.send("#{attribute}=".to_sym, value)

it appears to fix the issue:

invoice[:date] = Date.today
=> Mon, 05 Sep 2011

I've had reports that it'll work sometimes, and not others. We're not sure
of the exact cause at this stage.

Could be caused because of a loop we use:

new_attrs.each { |k,v| invoice[k] = v }

(side-note: a merge method would be great)

Reply to this email directly or view it on GitHub:
#25

from xeroizer.

waynerobinson avatar waynerobinson commented on July 18, 2024

This has now been resolved.

from xeroizer.

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.