aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib
Commit message (Collapse)AuthorAgeFilesLines
* Treat 303 See Other as a redirect response, tooJeremy Kemper2011-10-112-3/+3
|
* activeresource should treat HTTP status 307 as redirection, same as 301 and ↵Jim Herzberg2011-10-112-3/+3
| | | | 302; added missing test cases for statii 301 and 302.
* Provide read_attribute_for_serialization as the API to serialize attributes.José Valim2011-09-301-0/+4
|
* Fixed digest authentication for requests with a query string [#3158]Colin Shield & Ian Lesperance2011-09-281-1/+4
|
* Merge pull request #2678 from jmileham/ares_content_length_bugJon Leighton2011-09-121-1/+9
|\ | | | | ActiveResource shouldn't rely on the presence of Content-Length
| * ActiveResource shouldn't rely on the presence of Content-LengthJohn Mileham2011-09-111-1/+9
| |
* | Do not use objects that don't respond to to_sym (integers, floats, dates...) ↵Marc G Gauthier2011-09-011-1/+1
| | | | | | | | as parameters
* | Do not try to use as a parameter elements that are not acceptableMarc G Gauthier2011-08-191-1/+1
|/
* Changed a few instances of of words in the API docs written in British ↵Oemuer Oezkir2011-07-242-2/+2
| | | | | | English to American English(according to Weber)
* Master version is 3.2.0.betaSantiago Pastorino2011-06-301-2/+2
|
* Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-06-061-2/+8
|\ | | | | | | | | Conflicts: activerecord/RUNNING_UNIT_TESTS
| * annotate class_eval method for active resource schema attributesVijay Dev2011-06-051-2/+8
| |
* | Corrected some typos and American vs. Queen's English issuesLee Reilly2011-05-291-1/+1
|/
* Prefer each instead of for in activeresourceGuillermo Iguaran2011-05-231-1/+1
|
* Bump versions for rc1David Heinemeier Hansson2011-05-211-1/+1
|
* attr_accessor_with_default is deprecated, so lets not use it in ActiveResourceJosh Kalderimis2011-05-211-4/+16
|
* corrected some further tests and docs for the ARes change to json changeJosh Kalderimis2011-05-183-69/+69
|
* updated all the tests in ARes to work with jsonJosh Kalderimis2011-05-186-20/+26
|
* Update copyright year in Active Resource and Active SupportVijay Dev2011-05-091-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Prepare for beta1David Heinemeier Hansson2011-05-041-1/+1
|
* Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-05-043-10/+22
|\
| * Added some docs on ActiveResource::HttpMockSebastian Martinez2011-05-011-0/+4
| |
| * Documented ActiveResource#observingSebastian Martinez2011-05-011-0/+8
| |
| * Remove extra whitespaces.Sebastian Martinez2011-05-011-5/+5
| |
| * Fix punctuation errors.Sebastian Martinez2011-05-011-5/+5
| |
* | Optimize ActiveResource::Base.new(attributes)Chris Griego2011-05-011-15/+24
|/ | | | | | | | | | | | | | | | | | | | * Add performance benchmark similar to ActiveRecord * Lazily find_or_create_resource_for_collection to not incur the overhead for empty arrays and arrays of primatives * #duplicable? is faster than inline rescues when the object is not duplicable * Don't constantly raise and handle NameError, raising is expensive * Even when a resource is nested inside a module, always look inside the class first for the resource definition so we don't overwrite classes all the time Before: user system total real Model.new (instantiation) 0.120000 0.000000 0.120000 ( 0.119961) Nested::Model.new (instantiation) 0.150000 0.010000 0.160000 ( 0.151183) Model.new (setting attributes) 28.540000 0.680000 29.220000 ( 29.271775) Nested::Model.new (setting attributes) 29.740000 0.580000 30.320000 ( 30.486210) After: user system total real Model.new (instantiation) 0.120000 0.000000 0.120000 ( 0.121249) Nested::Model.new (instantiation) 0.150000 0.010000 0.160000 ( 0.152429) Model.new (setting attributes) 11.480000 0.170000 11.650000 ( 11.656163) Nested::Model.new (setting attributes) 11.510000 0.210000 11.720000 ( 11.724249)
* Remove `#among?` from Active SupportPrem Sichanugrist2011-04-131-1/+1
| | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
* Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵David Heinemeier Hansson2011-04-121-1/+1
| | | | suggestion!
* Using Object#in? and Object#either? in various placesPrem Sichanugrist2011-04-112-2/+4
| | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
* Active Resource typos.R.T. Lechow2011-03-051-2/+2
|
* Fixed a bug where ActiveResource::HttpMock would not replace an existing ↵Josh Bassett2011-02-091-3/+14
| | | | | | response when passing a block to the respond_to method. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* make the example code a bit more accurateAkira Matsuda2011-01-291-1/+1
|
* Fix indentationAkira Matsuda2011-01-291-1/+1
|
* class inheritable attributes is used no more! all internal use of class ↵Josh Kalderimis2010-11-201-3/+5
| | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com>
* Update the version.rb files to include a PRE partCarl Lerche2010-11-161-2/+2
|
* Always pull in version for frameworks (standardize autoload / require / none)wycats2010-10-101-0/+1
|
* - update documentationGaston Ramos2010-10-071-0/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* - Fix ActiveResource::HttpMock.respond_to replace the responseGaston Ramos2010-10-071-19/+28
| | | | | | if it has the same request Signed-off-by: José Valim <jose.valim@gmail.com>
* PERF: more changes from inject({}) to Hash + mapSantiago Pastorino2010-10-031-1/+1
|
* Move uri parser to AS as URI.parser method to reuse it in AP and ARes.Emilio Tagua2010-09-282-15/+12
|
* Fix broken module namespacing in ActiveResource with Ruby 1.9 [#5699 ↵Matthijs Langenberg2010-09-271-4/+6
| | | | | | | | | | | | | | | | | | | | | | | state:resolved] Following namespace use case was broken with Ruby 1.9: class Author < ActiveRecord::Base ... end module Api class Book < ActiveResouce::Base end end Let's say XML contains <book><author><name>John</name></author>.... Api::Book.first.author.class.to_s #=> Ruby 1.8.7: "Api::Book::Author" (namespaced, correct), Ruby 1.9: "Author" (toplevel, broken) Signed-off-by: José Valim <jose.valim@gmail.com>
* - update exceptions documentationGaston Ramos2010-09-271-0/+11
|
* - check prefix options in collection_pathGaston Ramos2010-09-271-0/+1
|
* - refactoring, move prefix_options check to a custom methodGaston Ramos2010-09-271-5/+9
|
* - elmenth_path raise an ActiveResource::MissingPrefixParam exception when ↵Gaston Ramos2010-09-272-0/+9
| | | | | | | prefix_options does not has all required prefix_options ex: class StreetAddress < ActiveResource::Base self.site = "http://37s.sunrise.i:3000/people/:person_id/" end StreetAddress.element_path(1) # => ActiveResource::MissingPrefixParam
* Allow per Resource format settingsJacques Crocker2010-09-253-8/+8
| | | | | | | | | | Previously, ActiveResource was using the connection level formatter for get requests. This made it impossible to use custom formatters per resource. Additionally this commit makes the Connection request methods more consistent. It always returns a Response. The base will then decode it each the response using its format setting. Merging this commit will allow users to add custom formatters on a per Resource basis. This enables handling pagination responses from the server side, a very common use case that was previously impossible without monkeypatching XmlFormat. Signed-off-by: José Valim <jose.valim@gmail.com>
* Allow ActiveResource to work with non-generated ids [#5660 state:resolved]Jacques Crocker2010-09-251-4/+6
| | | | | | This commit updates new? so that it knows whether or not the record was actually new or not, and doesn't rely solely on the presence of id. This enables the ability to set a custom primary_key that is not autogenerated by the server. Signed-off-by: José Valim <jose.valim@gmail.com>
* No need to use inject here.Emilio Tagua2010-09-221-4/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Exception handling more readableThiago Pradi2010-09-191-2/+2
| | | | | | [#5601 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* make sure a Content-Length header exists and that the response.body is not ↵Mike Abner2010-09-181-1/+1
| | | | nil before trying to call methods on it. Rack does not allow HTTP 204 responses to have a content-length header set. [#5038 state:resolved]