Skip to content

Instantly share code, notes, and snippets.

@devdiva
Created June 22, 2011 20:37
Show Gist options
  • Save devdiva/1041105 to your computer and use it in GitHub Desktop.
Save devdiva/1041105 to your computer and use it in GitHub Desktop.
ApiInfusionsoft error "undefined method `api_perform' for nil:NilClass"
# config/initializers/api_infusionsoft.rb
# actual file contains reall app and key values.
ApiInfusionsoft.set_account_apiconn("MYAPP.infusionsoft.com", "MYKEY")
class UsersController < ApplicationController
include ApiInfusionsoft
def index
@users = User.all
infuser = api_data_query(:Contact,1,0,{:Id=>3674}, ["Id", "FirstName", "LastName"])
print "\n infuser #{infuser.inspect}"
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @users }
end
end
# other methods rm'd for this example.
end
@nateleavitt
Copy link

Hello.. I'll check it out, and respond later this evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment