Hello, I want to call a REST API with active resource, described here:
this is my code: require ‘active_resource’ class Issue < ActiveResource::Base ActiveResource::Base.include_root_in_json = true self.site = ‘http://demo.redmine.org/’ end
Retrieving issues
issue = Issue.find(:all)
and getting this error:
/activeresource-4.0.0/lib/active_resource/base.rb:1327:in load': expected an attributes Hash, got ["issues", [{"id"=>91663, "project"=>{"id"=>77006, "name"=>"proj1"},.... The link mentions: *You may need to set
include_root_in_json = true` in your ActiveResource class*
But I don’t understand where and how. Greatly appreciate your help.
Cheers, Peter