R.T. Lechow
48841dd6ae
Active Resource typos.
2011-03-05 11:56:34 +01:00
Ken Mazaika
1bedee5631
ActiveResource validation tests did not test ActiveModel validations. Adjust the test to be done the Rails3 way.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-15 12:04:42 -02:00
Matthijs Langenberg
67a838574b
Fix broken module namespacing in ActiveResource with Ruby 1.9 [ #5699 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>
2010-09-27 23:10:55 +02:00
Jacques Crocker
ee5ef67c44
Allow ActiveResource to work with non-generated ids [ #5660 state:resolved]
...
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>
2010-09-25 11:15:40 +02:00
Santiago Pastorino
7ffe76046a
ActiveResource shouldn't consider modules in the path
...
[#4529 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-15 09:38:32 +02:00
taryn
c2f90d6530
Added validations to ActiveResource. Added a smoke test to see if we can add a validation and use it, and add a validates callback and use it.
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-08-19 09:03:17 -05:00
Marshall Huss
4d1552810f
HTTP proxy support
...
[#2133 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-08 15:33:55 -07:00
Luis Hurtado
225065709c
Fixes parsing deep nested resources from XML. [ #380 state:resolved]
2008-06-09 23:06:07 -07:00
Jeremy Kemper
0ee1cb2cd3
Ruby 1.9 compat, consistent load paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
Jeremy Kemper
e6988ef2ce
Subclasses share superclass site until explicitly set. This way you can set Superclass.site = ... after subclasses have been defined.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-21 22:12:21 +00:00
Rick Olson
011f4e7413
Allow subclassed resources to share the site info [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5717 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-13 02:15:27 +00:00
Jeremy Kemper
c918fbf14b
Deep hashes are converted into collections of resources. Class attribute writer methods.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4985 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 10:04:23 +00:00
Rick Olson
7749c9c220
Major updates to ActiveResource, please see changelog and unit tests [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-01 01:15:10 +00:00
David Heinemeier Hansson
99d268c853
Initial check-in of Active Resourse
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4492 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 14:44:22 +00:00