aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* Improve documentation coverage and markupXavier Noria2008-05-021-5/+6
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Introduce ActiveResource::Base.timeout. This allows a timeout to be set on ↵Cheah Chu Yeow2008-04-221-1/+37
| | | | | | the internal Net::HTTP instance ARes uses (default is 60 seconds). Setting a low timeout allows ARes clients to fail-fast in the event of a unresponsive/crashed server, rather than cause cascading failures in your application. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Don't shadow attrs varJeremy Kemper2008-03-301-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9145 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add #clone. Closes #7352 [Ryan Daigle, thechrisoshow]Jeremy Kemper2008-03-281-0/+37
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9121 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that to_param should be used and honored instead of hardcoding the id ↵David Heinemeier Hansson2008-03-281-4/+4
| | | | | | (closes #11406) [gspiers] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9114 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* URI.decode site username/password. Closes #11169 [Ernesto Jimenez]Jeremy Kemper2008-02-191-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add user and password configuration options to ActiveResource::Base, not ↵Michael Koziarski2008-02-181-6/+71
| | | | | | all credentials can be specified inline. Closes #11112 [ernesto.jimenez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use HEAD instead of GET inside exists? Closes #11062 [bscofield]Michael Koziarski2008-02-091-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix small documentation typo. Closes #10670 [l.guidi]Rick Olson2008-01-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8528 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* find_or_create_resource_for handles module nesting. Closes #10646.Jeremy Kemper2008-01-021-8/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow setting ActiveResource::Base#format before #site. [rick]Rick Olson2007-12-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document custom methods. Closes #10589.Jeremy Kemper2007-12-211-16/+30
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct empty response handling. Closes #10445.Jeremy Kemper2007-12-101-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8364 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update XML documentation examples to include explicit type attributes. ↵Marcel Molina2007-11-061-23/+23
| | | | | | Closes #9754 [hasmanyjosh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8090 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Base#to_param to Active Resource that quacks like ActiveRecord. Closes ↵Michael Koziarski2007-10-071-0/+5
| | | | | | #9557 [bradediger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveResource.format= which defaults to :xml but can also be set to ↵David Heinemeier Hansson2007-09-201-6/+28
| | | | | | :json [DHH]. Added one-off declarations of mock behavior [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7518 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixes that using a subclass of an ARes object would cache a connection ↵Tobias Lütke2007-06-271-3/+7
| | | | | | object based of its parent's site variable. Changing the parent's site would have no effect on the descentent objects. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7143 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Big documentation upgrade for ARes (closes #8694) [jeremymcanally]David Heinemeier Hansson2007-06-231-47/+464
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7098 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix reload error when path prefix is used. Closes #8727.Jeremy Kemper2007-06-221-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed query methods on resources. [Cody Fauser]Tobias Lütke2007-06-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6972 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* pass the prefix_options to the instantiated record when using find without a ↵Rick Olson2007-06-011-1/+1
| | | | | | specific id. Closes #8544 [alloy] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6925 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Handle string and symbol param keys when splitting params into prefix params ↵Rick Olson2007-05-091-2/+3
| | | | | | and query params. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make respond_to? work as expectedTobias Lütke2007-05-041-0/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Try the class itself if the ancestor doesnt have anythingDavid Heinemeier Hansson2007-05-021-2/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible with ↵David Heinemeier Hansson2007-05-011-29/+49
| | | | | | :params and more strict usage of scopes [DHH] Added find-one with symbol [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* change #custom_headers to just #headers [Rick]Rick Olson2007-04-291-7/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add support for setting custom headers per ActiveResource model [Rick]Rick Olson2007-04-291-5/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added find-by-path options to ActiveResource::Base.find [DHH]David Heinemeier Hansson2007-04-271-7/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for using classes from within a single nested module [DHH]David Heinemeier Hansson2007-04-261-4/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6587 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added load_attributes_from_response as a way of loading attributes from ↵David Heinemeier Hansson2007-04-261-4/+7
| | | | | | other responses than just create [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The find should instantiate real objects, not return hashesDavid Heinemeier Hansson2007-04-261-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6585 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for calling custom methods #6979 [rwdaigle]David Heinemeier Hansson2007-04-261-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6584 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* dont bother merging in prefix_optionsRick Olson2007-04-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove explicit prefix_options parameter for ↵Rick Olson2007-04-241-20/+67
| | | | | | ActiveResource::Base#initialize. Allow ActiveResource::Base.delete with custom prefix. Add ActiveResource::Base#dup [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont insert search parameters into the objectDavid Heinemeier Hansson2007-04-231-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Disregard namespaces from the default element name, so Highrise::Person will ↵David Heinemeier Hansson2007-04-191-5/+14
| | | | | | just try to fetch from "/people", not "/highrise/people" [DHH] Added that saves which get a body response (and not just a 201) will use that response to update themselves [DHH] Fixed constant warning when fetching the same object multiple times [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow array and hash query parameters. Closes #7756.Jeremy Kemper2007-03-111-17/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Loading a resource preserves its prefix_options. Closes #7353. Silence ↵Jeremy Kemper2007-01-241-4/+8
| | | | | | prefix redefinition warnings; fix type in logged error. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6032 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Carry over the convenience of #create from ActiveRecord. Closes #7340. ↵Rick Olson2007-01-241-0/+15
| | | | | | [Ryan Daigle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6025 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mega documentation patches. #7025, #7069 [rwdaigle]Rick Olson2007-01-161-20/+42
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5962 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base.exists?(id, options) and Base#exists? check whether the resource is ↵Jeremy Kemper2007-01-121-0/+12
| | | | | | found. Closes #6970. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Validating save returns boolean; update and create return responses.Jeremy Kemper2006-12-291-4/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5810 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* prefix_parameters pulls /:path/:params from the URI prefixJeremy Kemper2006-12-291-13/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5809 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* doh typo in commit from the hipJeremy Kemper2006-12-291-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* generate prefix parameters if undefinedJeremy Kemper2006-12-291-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Query string support. Closes #6855.Jeremy Kemper2006-12-291-6/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5804 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base#==, eql?, and hash methods. == returns true if its argument is ↵Jeremy Kemper2006-12-221-0/+16
| | | | | | identical to self or if it's an instance of the same class, is not new?, and has the same id. eql? is an alias for ==. hash delegates to id. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Subclasses share superclass site until explicitly set. This way you can set ↵Jeremy Kemper2006-12-211-12/+9
| | | | | | Superclass.site = ... after subclasses have been defined. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow subclassed resources to share the site info [Rick]Rick Olson2006-12-131-1/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5717 5ecf4fe2-1ee6-0310-87b1-e25e094e27de