I created one class to call api on other rails server.
Client (RemoteAssessment.rb):
class RemoteAssessment < ActiveResource::Base
self.site = "http://localhost:5000/api/v1"
headers["Content-Type"] = "application/json"
with_api_auth(access_id, secret_key)
end
Calling code (onefile.rb):
RemoteAssessment.find('4')
I want to pass "access_id" and "secret_key" from my caller (onefile.rb). I tried multiple ways but it is not working.
I am new to ruby on rails, so it may be a basic question.
Please help me to figure out passing parameter from caller.
Thanks, Sachin