aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* Active Resource typos.R.T. Lechow2011-03-051-2/+2
|
* 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>
* Move uri parser to AS as URI.parser method to reuse it in AP and ARes.Emilio Tagua2010-09-281-10/+7
|
* 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-271-0/+6
| | | | | | | 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-251-5/+5
| | | | | | | | | | 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]
* lifecycle should be two words, life cycleJaime Iniesta2010-08-261-4/+4
|
* fix broken relative links [#5415 state:committed]Joost Baaij2010-08-241-1/+1
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* fix loading of different elements in array then int and string [#5036 ↵Josef Reidinger2010-08-021-3/+3
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* fix escaping id and parameters in path [#5137 state:resolved]Josef Reidinger2010-07-261-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Object#returning removedSantiago Pastorino2010-07-251-1/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing ↵José Valim2010-06-241-0/+1
| | | | frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-151-2/+2
|\
| * Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-2/+2
| |
* | There is no type="array" returned with errors. [#3691:resolved]Ryan Bigg2010-06-121-1/+1
|/
* Adding to_key to ActiveResource objects using ActiveModel::Conversion [#4685 ↵Elomar França2010-05-261-5/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* refactor evals and adds some __FILE__ and __LINE__Santiago Pastorino2010-05-201-6/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* ActiveResource shouldn't consider modules in the pathSantiago Pastorino2010-05-151-16/+2
| | | | | | [#4529 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixes to_json and to_xml for ActiveResourceSantiago Pastorino2010-05-121-6/+15
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Make ActiveResource serialize XML correctly when element_name is set.Santiago Pastorino2010-05-121-4/+15
| | | | | | [#4529] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Reuse Active Model serialization in Active Resource. [#2584 state:committed]Santiago Pastorino2010-04-261-63/+3
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Revert "create option to include_root_in_json for ActiveResource [#2584 ↵Jeremy Kemper2010-04-251-9/+0
| | | | | | | | | | state:committed]" This reverts commits 72f89b5d971b48a133c4c0af56fbeda35d738dae, 137d8e0b2fe9fcc4fdac6cbbd44ca010784e5972. Should reuse Active Model. [#2584 state:incomplete]
* fix stack trace lines on class_evalSantiago Pastorino2010-04-091-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* create option to include_root_in_json for ActiveResource [#2584 state:committed]Santiago Pastorino2010-04-051-0/+9
|
* adds missing requires for Object#duplicable?Xavier Noria2010-03-281-0/+1
|
* Makes ActiveResource work with form_for: - Adds a `build' method that can be ↵Gaël Deest2010-03-271-0/+49
| | | | | used instead of `new' to load a new, unsaved resource from the remote site, filled with the correct default values. - Adds a `persisted?' method that simply returns the opposite value than the `new?' method. [#4222 state:resolved] [#4155 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Merge remote branch 'mainstream/master'Pratik Naik2010-01-041-2/+141
|\
| * All ARes modules are safe to deferJoshua Peek2009-12-221-0/+3
| |
| * Use instance_eval for schema blockJoshua Peek2009-12-201-9/+9
| |
| * Rename define_schema => schemaJoshua Peek2009-12-201-23/+20
| |
| * Rename SchemaDefinition => SchemaJoshua Peek2009-12-201-8/+7
| |
| * define_schema for Active ResourceTaryn East2009-12-201-2/+142
| | | | | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | Merge remote branch 'mainstream/master'Pratik Naik2009-11-171-16/+36
|\| | | | | | | | | Conflicts: activesupport/lib/active_support/core_ext/hash/conversions.rb
| * Ruby 1.9.2: URI.parse and .decode are deprecatedJeremy Kemper2009-11-091-4/+8
| |
| * Remove reliance on string access core extensionJeremy Kemper2009-11-091-12/+15
| |
| * Consolidate Object#to_param and #to_query core extensionsJeremy Kemper2009-11-021-0/+1
| |
| * Digest auth option for ActiveResource.pivotal2009-10-151-0/+12
| | | | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* | Merge commit 'mainstream/master'Pratik Naik2009-10-101-6/+36
|\|
| * Cleanup whitespace introduced in 8377646 and f4f6888Joshua Peek2009-10-021-35/+34
| |
| * add indifferent access to the attributesTaryn East2009-10-021-1/+2
| | | | | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
| * update_attribute(s) added to Active ResourceTaryn East2009-10-021-0/+30
| | | | | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>