Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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