Giter Site home page Giter Site logo

Boolean about parse-ruby-client HOT 10 CLOSED

adelevie avatar adelevie commented on August 11, 2024
Boolean

from parse-ruby-client.

Comments (10)

adelevie avatar adelevie commented on August 11, 2024

You should be using an instance of Parse::Object not the actual class.

Right:

obj = Parse::Object.new("Post")
obj["foo"] = false
obj.save

Wrong:

obj = Parse::Object
obj["foo"] = false

from parse-ruby-client.

omrishiv avatar omrishiv commented on August 11, 2024

I was oversimplifying my example. That is what I'm doing, here is the code that doesn't work:

special = Parse::Object.new "Specials"
special["is_regular_item"] = false
special.save

from parse-ruby-client.

adelevie avatar adelevie commented on August 11, 2024

What part of that doesn't work? Can you paste the error? One possibility is that you've already saved that field in your Parse db with an object of a different type.

from parse-ruby-client.

omrishiv avatar omrishiv commented on August 11, 2024

That's the thing, there is no error. The model saves fine on Parse, but when I retrieve it, the field isn't there. I'm actually not the owner of the API, but I know when I give it something like "false" it asks me for a boolean. I can ask him, what do you need from him?

from parse-ruby-client.

adelevie avatar adelevie commented on August 11, 2024

The code that doesn't work and the resulting output.

On Sat, Mar 16, 2013 at 3:13 PM, OmriShiv [email protected] wrote:

That's the thing, there is no error. The model saves fine on Parse, but
when I retrieve it, the field isn't there. I'm actually not the owner of
the API, but I know when I give it something like "false" it asks me for a
boolean. I can ask him, what do you need from him?


Reply to this email directly or view it on GitHubhttps://github.com//issues/73#issuecomment-15013182
.

from parse-ruby-client.

omrishiv avatar omrishiv commented on August 11, 2024

Ok, for whatever reason, after I called the item directly set the boolean, then saved it, it worked fine, but it didn't work before I saved it. I'll just save it again after setting it

specials = Parse.get "Specials", "0934kj2"
specials["is_regular_item"] = false
specials.save

from parse-ruby-client.

omrishiv avatar omrishiv commented on August 11, 2024

I tried this again with getting a new instance of the object, only changing the boolean field and saving it again and it doesn't work. It does work if I set it through cURL. I looked through the tests and I can't seem to find any that check for booleans. I don't know what else to provide, the API that the developer built works, but the gem doesn't seem to be pushing booleans to it correctly, at lest for me

from parse-ruby-client.

adelevie avatar adelevie commented on August 11, 2024

Is this still a problem for you? If so, please re-open and I'll work with you to fix this. Thanks for reporting this in the first place.

from parse-ruby-client.

omrishiv avatar omrishiv commented on August 11, 2024

I was using this as a proof of concept for someone; however, last I left it, yes, it was still not working. That being said, I'm no longer working on this concept, so I don't need it working

from parse-ruby-client.

adelevie avatar adelevie commented on August 11, 2024

Alright, I'm going to leave this closed then. Thanks.

from parse-ruby-client.

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.