neoid-gem/neoid

neoidable error

Closed this issue · 1 comments

Given that I have model as so:

class Post < ActiveRecord::Base
  include Neoid::Node
end

And in the console I run:

Post.create({title: "This and that", body: "hey there, this is the body!"})

It succeeds. But, if I do:

class Post < ActiveRecord::Base
  include Neoid::Node

  neoidable do |c|
    c.field :title
  end
end

Then this is what happens:

Post.create({title: "This and that", body: "hey there, this is the body!"})
NoMethodError: undefined method `dump' for #<Excon::Response:0x007ff3ad6f4228>
from /Users/benmorgan/.rvm/gems/ruby-2.1.2/gems/neography-1.5.1/lib/neography/connection.rb:216:in `handle_4xx_500_response'

I cannot figure this one out and I don't believe its happening in neography as its just the REST API wrapper. Any thoughts?

Was solved by setting c.enable_subrefs to false.