2006-08-26 04:23:36 -04:00
|
|
|
*SVN*
|
|
|
|
|
2006-08-31 21:15:10 -04:00
|
|
|
* Major updates [Rick Olson]
|
|
|
|
|
|
|
|
* Add full support for find/create/update/destroy
|
|
|
|
* Add support for specifying prefixes.
|
|
|
|
* Allow overriding of element_name, collection_name, and primary key
|
|
|
|
* Provide simpler HTTP mock interface for testing
|
|
|
|
|
|
|
|
# rails routing code
|
|
|
|
map.resources :posts do |post|
|
|
|
|
post.resources :comments
|
|
|
|
end
|
|
|
|
|
|
|
|
# ActiveResources
|
|
|
|
class Post < ActiveResource::Base
|
|
|
|
self.site = "http://37s.sunrise.i:3000/"
|
|
|
|
end
|
|
|
|
|
|
|
|
class Comment < ActiveResource::Base
|
|
|
|
self.site = "http://37s.sunrise.i:3000/posts/:post_id/"
|
|
|
|
end
|
|
|
|
|
|
|
|
@post = Post.find 5
|
|
|
|
@comments = Comment.find :all, :post_id => @post.id
|
|
|
|
|
|
|
|
@comment = Comment.new({:body => 'hello world'}, {:post_id => @post.id})
|
|
|
|
@comment.save
|
|
|
|
|
2006-08-31 05:31:11 -04:00
|
|
|
* Base.site= accepts URIs. 200...400 are valid response codes. PUT and POST request bodies default to ''. [Jeremy Kemper]
|
2006-08-31 03:55:31 -04:00
|
|
|
|
2006-08-26 04:23:36 -04:00
|
|
|
* Initial checkin: object-oriented client for restful HTTP resources which follow the Rails convention. [DHH]
|