I’d like to play around a bit with ActiveResource for consuming a web
service. Does anyone have sample code they would be willing to share?
I’ve googled all around and have come up empty except for simple (non-
working) examples given in the RailsConf keynote and some associated
blog entries.
I’d like to play around a bit with ActiveResource for consuming a web
service. Does anyone have sample code they would be willing to share?
I’ve googled all around and have come up empty except for simple (non-
working) examples given in the RailsConf keynote and some associated
blog entries.
def done!
connection.post “/jobs/#{id}.xml;done”
end
end
GET /jobs.xml calls JobsController#index
puts Job.find(:all).inspect
POST /jobs/1.xml;done calls JobsController#done with params[:id] == 1
job.done!
Check out the scaffold_resource generator for instantly available
resources:
./script/generate scaffold_resource Job worker:string command:text
description:text started_at:datetime finished_at:datetime
Best,
jeremy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.