Skip to content
Newer
Older
100644 107 lines (71 sloc) 3.9 KB
8261f17 @jeremy start an Active Resource changelog
jeremy authored Aug 26, 2006
1 *SVN*
2
d97456d @jeremy Allow array and hash query parameters. Closes #7756.
jeremy authored Mar 11, 2007
3 * Allow array and hash query parameters. #7756 [Greg Spurrier]
4
1b1ddf1 @jeremy Loading a resource preserves its prefix_options. Closes #7353. Silenc…
jeremy authored Jan 24, 2007
5 * Loading a resource preserves its prefix_options. #7353 [Ryan Daigle]
6
f49e449 @technoweenie Carry over the convenience of #create from ActiveRecord. Closes #7340.…
technoweenie authored Jan 24, 2007
7 * Carry over the convenience of #create from ActiveRecord. Closes #7340. [Ryan Daigle]
8
1bdb14b @technoweenie Increase ActiveResource::Base test coverage. Closes #7173, #7174 [Ric…
technoweenie authored Jan 23, 2007
9 * Increase ActiveResource::Base test coverage. Closes #7173, #7174 [Rich Collins]
10
e00e6a2 @jeremy Interpret 422 Unprocessable Entity as ResourceInvalid. Closes #7097.
jeremy authored Jan 17, 2007
11 * Interpret 422 Unprocessable Entity as ResourceInvalid. #7097 [dkubb]
12
932e7b0 @technoweenie Mega documentation patches. #7025, #7069 [rwdaigle]
technoweenie authored Jan 16, 2007
13 * Mega documentation patches. #7025, #7069 [rwdaigle]
14
2bb33bb @jeremy Base.exists?(id, options) and Base#exists? check whether the resource…
jeremy authored Jan 12, 2007
15 * Base.exists?(id, options) and Base#exists? check whether the resource is found. #6970 [rwdaigle]
16
4e57ac3 @jeremy Query string support. Closes #6855.
jeremy authored Dec 29, 2006
17 * Query string support. [untext, Jeremy Kemper]
18 # GET /forums/1/topics.xml?sort=created_at
19 Topic.find(:all, :forum_id => 1, :sort => 'created_at')
20
c172154 @jeremy Base#==, eql?, and hash methods. == returns true if its argument is i…
jeremy authored Dec 22, 2006
21 * Base#==, eql?, and hash methods. == returns true if its argument is 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. [Jeremy Kemper]
22
e6988ef @jeremy Subclasses share superclass site until explicitly set. This way you c…
jeremy authored Dec 21, 2006
23 * Allow subclassed resources to share the site info [Rick, Jeremy Kemper]
011f4e7 @technoweenie Allow subclassed resources to share the site info [Rick]
technoweenie authored Dec 13, 2006
24
25 class BeastResource < ActiveResource::Base
26 self.site = 'http://beast.caboo.se'
27 end
e6988ef @jeremy Subclasses share superclass site until explicitly set. This way you c…
jeremy authored Dec 21, 2006
28
011f4e7 @technoweenie Allow subclassed resources to share the site info [Rick]
technoweenie authored Dec 13, 2006
29 class Forum < BeastResource
30 # taken from BeastResource
31 # self.site = 'http://beast.caboo.se'
32 end
e6988ef @jeremy Subclasses share superclass site until explicitly set. This way you c…
jeremy authored Dec 21, 2006
33
011f4e7 @technoweenie Allow subclassed resources to share the site info [Rick]
technoweenie authored Dec 13, 2006
34 class Topic < BeastResource
e6988ef @jeremy Subclasses share superclass site until explicitly set. This way you c…
jeremy authored Dec 21, 2006
35 self.site += '/forums/:forum_id'
011f4e7 @technoweenie Allow subclassed resources to share the site info [Rick]
technoweenie authored Dec 13, 2006
36 end
37
55d4dbb @technoweenie Fix issues with ActiveResource collection handling. Closes #6291. [bm…
technoweenie authored Dec 12, 2006
38 * Fix issues with ActiveResource collection handling. Closes #6291. [bmilekic]
39
1d31a04 Use attr_accessor_with_default to dry up attribute initialization. Re…
Marcel Molina authored Nov 16, 2006
40 * Use attr_accessor_with_default to dry up attribute initialization. References #6538. [Stuart Halloway]
41
9c94438 @jamis Add basic logging support for logging outgoing requests.
jamis authored Oct 23, 2006
42 * Add basic logging support for logging outgoing requests. [Jamis Buck]
43
6c0609f @jamis Add Base.delete for deleting resources without having to instantiate …
jamis authored Oct 6, 2006
44 * Add Base.delete for deleting resources without having to instantiate them first. [Jamis Buck]
45
628838e @jamis Make #save behavior mimic AR::Base#save (true on success, false on fa…
jamis authored Oct 2, 2006
46 * Make #save behavior mimic AR::Base#save (true on success, false on failure). [Jamis Buck]
47
7ac6ed8 @technoweenie Add Basic HTTP Authentication to ActiveResource (closes #6305). [jona…
technoweenie authored Sep 29, 2006
48 * Add Basic HTTP Authentication to ActiveResource (closes #6305). [jonathan]
49
4d63e01 @technoweenie fixed failing tests now that non-GET requests are sent with .xml file…
technoweenie authored Sep 20, 2006
50 * Extracted #id_from_response as an entry point for customizing how a created resource gets its own ID.
51 By default, it extracts from the Location response header.
52
0a84624 @jeremy Optimistic locking: raise ActiveResource::ResourceConflict on 409 Con…
jeremy authored Sep 9, 2006
53 * Optimistic locking: raise ActiveResource::ResourceConflict on 409 Conflict response. [Jeremy Kemper]
54
55 # Example controller action
56 def update
57 @person.save!
58 rescue ActiveRecord::StaleObjectError
59 render :xml => @person.reload.to_xml, :status => '409 Conflict'
60 end
61
8d9e660 @technoweenie Basic validation support [Rick Olson]
technoweenie authored Sep 8, 2006
62 * Basic validation support [Rick Olson]
63
64 Parses the xml response of ActiveRecord::Errors#to_xml with a similar interface to ActiveRecord::Errors.
65
66 render :xml => @person.errors.to_xml, :status => '400 Validation Error'
67
c918fbf @jeremy Deep hashes are converted into collections of resources. Class attrib…
jeremy authored Sep 4, 2006
68 * Deep hashes are converted into collections of resources. [Jeremy Kemper]
69 Person.new :name => 'Bob',
70 :address => { :id => 1, :city => 'Portland' },
71 :contacts => [{ :id => 1 }, { :id => 2 }]
72 Looks for Address and Contact resources and creates them if unavailable.
73 So clients can fetch a complex resource in a single request if you e.g.
74 render :xml => @person.to_xml(:include => [:address, :contacts])
75 in your controller action.
76
7749c9c @technoweenie Major updates to ActiveResource, please see changelog and unit tests …
technoweenie authored Sep 1, 2006
77 * Major updates [Rick Olson]
78
79 * Add full support for find/create/update/destroy
80 * Add support for specifying prefixes.
81 * Allow overriding of element_name, collection_name, and primary key
82 * Provide simpler HTTP mock interface for testing
83
84 # rails routing code
85 map.resources :posts do |post|
86 post.resources :comments
87 end
88
89 # ActiveResources
90 class Post < ActiveResource::Base
91 self.site = "http://37s.sunrise.i:3000/"
92 end
93
94 class Comment < ActiveResource::Base
95 self.site = "http://37s.sunrise.i:3000/posts/:post_id/"
96 end
97
98 @post = Post.find 5
99 @comments = Comment.find :all, :post_id => @post.id
100
101 @comment = Comment.new({:body => 'hello world'}, {:post_id => @post.id})
102 @comment.save
103
f9b3694 @jeremy 200...400 are valid response codes. PUT and POST request bodies defau…
jeremy authored Aug 31, 2006
104 * Base.site= accepts URIs. 200...400 are valid response codes. PUT and POST request bodies default to ''. [Jeremy Kemper]
c1af2db @jeremy site= accepts URIs
jeremy authored Aug 31, 2006
105
8261f17 @jeremy start an Active Resource changelog
jeremy authored Aug 26, 2006
106 * Initial checkin: object-oriented client for restful HTTP resources which follow the Rails convention. [DHH]
Something went wrong with that request. Please try again.