Skip to content

Instantly share code, notes, and snippets.

@s-andringa
Created August 25, 2009 05:42
Show Gist options
  • Save s-andringa/174497 to your computer and use it in GitHub Desktop.
Save s-andringa/174497 to your computer and use it in GitHub Desktop.
# HTTP Basic Auth
class User < ActiveRecord::Base
has_remote :site => "http://example.com", :user => "foo", :password => "bar" do |remote|
#...
end
end
# API key
class User < ActiveRecord::Base
has_remote :site => "http://example.com?api_key=12x34x5" do |remote|
#...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment