Skip to content

Instantly share code, notes, and snippets.

@NeMO84
Created March 17, 2011 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeMO84/873655 to your computer and use it in GitHub Desktop.
Save NeMO84/873655 to your computer and use it in GitHub Desktop.
class A < ActiveResource::Base ; end
A.site
=> nil
A.format
=> ActiveResource::Formats::XmlFormat
ActiveResource::Base.site = "http://abc123.com/"
=> "http://abc123.com/"
A.site
=> "http://abc123.com/"
ActiveResource::Base.format = :json
=> :json
A.format
=> ActiveResource::Formats::XmlFormat # I would expect the behavior to carry over so that I dont have to specify on each class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment