Installation NoMethodError: undefined method `has_key?' for "objectId":String
stefanocdn opened this issue · comments
Hi I am having this error
NoMethodError: undefined method `has_key?' for "objectId":String from /Users/foobar/.gem/ruby/2.1.2/gems/parse-ruby-client-0.3.0/lib/parse/object.rb:198:in `parse'
whenever I try to call
installation = Parse::Installation.new "objectId"
I am using version 0.3.0, any idea where does that come from?
Parse::Installation.new
just doesn't work anymore
Parse::Installation.get
doesn't exist and with you try: Parse::Installation.new {"installation_id"=>"ID"}
nothing happens
@fernandodev which version are you using? The 0.3.0 is seriously old and we're working on master.
can you explain what you're trying to do?
Hello @rhymes
I'm using v0.3.0 =~
I was trying to get a specific Installation
by installation_id
. It was necessary for targeted push notification.
At this moment I've implemented an API Wrapper for Parse using rest_client
's gem.
@fernandodev don't know if you have the time but you could try out the github version.
To retrieve an installation by a field different from objectId you should query for it. For example:
installation = client.query('Installation').tap do |q|
q.eq('installation_id', value)
end.get
Thank you @rhymes 👍