Skip to content
Newer
Older
100644 349 lines (198 sloc) 11.1 KB
e5f4a39 @carlosantoniodasilva Update changelogs with release dates and minor improvements [ci skip]
carlosantoniodasilva authored
1 ## Rails 3.0.20 (unreleased)
826548b @tenderlove updating changelogs
tenderlove authored
2
e5f4a39 @carlosantoniodasilva Update changelogs with release dates and minor improvements [ci skip]
carlosantoniodasilva authored
3 ## Rails 3.0.19 (Jan 8, 2013)
6eda26a @spastorino Add CHANGELOG entries
spastorino authored
4
5 * No changes.
6
e5f4a39 @carlosantoniodasilva Update changelogs with release dates and minor improvements [ci skip]
carlosantoniodasilva authored
7 ## Rails 3.0.18 (Jan 2, 2013)
32b4cbc @tenderlove updating changelogs
tenderlove authored
8
e5f4a39 @carlosantoniodasilva Update changelogs with release dates and minor improvements [ci skip]
carlosantoniodasilva authored
9 * No changes.
32b4cbc @tenderlove updating changelogs
tenderlove authored
10
4be9dbf @tenderlove updating changelogs
tenderlove authored
11 ## Rails 3.0.14 (Jun 12, 2012)
2c95963 @tenderlove bumping versions in the CHANGELOG
tenderlove authored
12
e5f4a39 @carlosantoniodasilva Update changelogs with release dates and minor improvements [ci skip]
carlosantoniodasilva authored
13 * No changes.
2c95963 @tenderlove bumping versions in the CHANGELOG
tenderlove authored
14
86c97e1 @tenderlove updating CHANGELOGs
tenderlove authored
15 * Rails 3.0.13 (May 31, 2012)
16
17 * No changes.
18
5c10a53 @guilleiguaran Updating changelogs in 3-0-stable
guilleiguaran authored
19 *Rails 3.0.10 (August 16, 2011)*
20
21 * No changes.
22
9d17458 @tenderlove more changelog updates
tenderlove authored
23
24 *Rails 3.0.9 (June 16, 2011)*
25
5c10a53 @guilleiguaran Updating changelogs in 3-0-stable
guilleiguaran authored
26 *No changes.
27
28
9d17458 @tenderlove more changelog updates
tenderlove authored
29 *Rails 3.0.8 (June 7, 2011)*
eecbc10 @tenderlove updating changelogs
tenderlove authored
30
31 *No changes.
32
5c10a53 @guilleiguaran Updating changelogs in 3-0-stable
guilleiguaran authored
33
2c32601 @tenderlove bumping version for release
tenderlove authored
34 *Rails 3.0.7 (April 18, 2011)*
6bc9dd7 @spastorino Add missing CHANGELOG entries
spastorino authored
35
36 *No changes.
37
38
857ec16 @tenderlove updating CHANGELOG
tenderlove authored
39 *Rails 3.0.6 (April 5, 2011)
ea026f1 @spastorino Add missing versions to CHANGELOGs
spastorino authored
40
41 * No changes.
42
43
44 *Rails 3.0.5 (February 26, 2011)*
45
46 * No changes.
47
48
49 *Rails 3.0.4 (February 8, 2011)*
50
51 * No changes.
52
53
54 *Rails 3.0.3 (November 16, 2010)*
55
56 * No changes.
57
58
31b6a6a @dhh Prep for 3.0.2 release
dhh authored
59 *Rails 3.0.2 (November 15, 2010)*
60
61 * No changes.
fcdedb2 @jeremy Bump version to 3.0.1.pre
jeremy authored
62
63
14b33a4 @spastorino Merge 3.0.1 CHANGELOGs and prepare 3.0.2.pre
spastorino authored
64 *Rails 3.0.1 (October 15, 2010)*
65
31b6a6a @dhh Prep for 3.0.2 release
dhh authored
66 * No changes.
67
fcdedb2 @jeremy Bump version to 3.0.1.pre
jeremy authored
68
851552b @dhh Prep for final release
dhh authored
69 *Rails 3.0.0 (August 29, 2010)*
43e2fd9 @jeremy Update CHANGELOG for include_root_in_json.
jeremy authored
70
71 * JSON: set Base.include_root_in_json = true to include a root value in the JSON: {"post": {"title": ...}}. Mirrors the Active Record option. [Santiago Pastorino]
72
7975885 @jakimowicz Add support for errors in JSON format.
jakimowicz authored
73 * Add support for errors in JSON format. #1956 [Fabien Jakimowicz]
74
916b18a Active Resource recognizes 410 as Resource Gone now [#2316 state:reso…
Jordan Brough authored
75 * Recognizes 410 as Resource Gone. #2316 [Jordan Brough, Jatinder Singh]
76
3e09516 @rnicholson Add ability to set SSL options on ARes connections.
rnicholson authored
77 * More thorough SSL support. #2370 [Roy Nicholson]
78
4d15528 @mwhuss HTTP proxy support
mwhuss authored
79 * HTTP proxy support. #2133 [Marshall Huss, Sébastien Dabet]
80
81
73fc42c @dhh Prepare for final 2.3 release
dhh authored
82 *2.3.2 [Final] (March 15, 2009)*
77b0994 @dhh Prep for RC2 later today
dhh authored
83
73fc42c @dhh Prepare for final 2.3 release
dhh authored
84 * Nothing new, just included in 2.3.2
ed5fa2f @dhh Mark CHANGELOGs for release
dhh authored
85
86
61e4370 @dhh Prepare for RC2
dhh authored
87 *2.2.1 [RC2] (November 14th, 2008)*
dffc2e2 @dhh Fixed that ActiveResource#post would post an empty string when it sho…
dhh authored
88
89 * Fixed that ActiveResource#post would post an empty string when it shouldn't be posting anything #525 [Paolo Angelini]
90
91
d224e6c @dhh Update CHANGELOGs with the last few fixes, set date for today
dhh authored
92 *2.2.0 [RC1] (October 24th, 2008)*
e7a305f @dhh Fixed Base#exists? to check status code as integer [#299 state:resolv…
dhh authored
93
f2c10f2 Add ActiveResource::Base#to_xml and ActiveResource::Base#to_json meth…
Cody Fauser authored
94 * Add ActiveResource::Base#to_xml and ActiveResource::Base#to_json. #1011 [Rasik Pandey, Cody Fauser]
95
893fb5b @xymbol Add ActiveResource::Base.find(:last). [#754 state:resolved]
xymbol authored
96 * Add ActiveResource::Base.find(:last). [#754 state:resolved] (Adrian Mugnolo)
97
aad7cac @dhh Fixed problems with the logger used if the logging string included %'s [
dhh authored
98 * Fixed problems with the logger used if the logging string included %'s [#840 state:resolved] (Jamis Buck)
99
e7a305f @dhh Fixed Base#exists? to check status code as integer [#299 state:resolv…
dhh authored
100 * Fixed Base#exists? to check status code as integer [#299 state:resolved] (Wes Oldenbeuving)
101
102
f9db769 @dhh Making ready for release of 2.1
dhh authored
103 *2.1.0 (May 31st, 2008)*
a1ec3aa @jeremy Ruby 1.9 compatibility
jeremy authored
104
869d731 Fixed response logging to use length instead of the entire thing (sea…
David Heinemeier Hansson authored
105 * Fixed response logging to use length instead of the entire thing (seangeo) [#27]
106
9300ebd @dhh Fixed that to_param should be used and honored instead of hardcoding …
dhh authored
107 * Fixed that to_param should be used and honored instead of hardcoding the id #11406 [gspiers]
108
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
109 * Improve documentation. [Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert]
ca94136 @lifo Improve documentation.
lifo authored
110
5396b0f @NZKoz Use HEAD instead of GET inside exists? Closes #11062 [bscofield]
NZKoz authored
111 * Use HEAD instead of GET in exists? [bscofield]
112
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
113 * Fix small documentation typo. Closes #10670 [Luca Guidi]
4261b83 @technoweenie Fix small documentation typo. Closes #10670 [l.guidi]
technoweenie authored
114
9a97f9a @jeremy find_or_create_resource_for handles module nesting. Closes #10646.
jeremy authored
115 * find_or_create_resource_for handles module nesting. #10646 [xavier]
116
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
117 * Allow setting ActiveResource::Base#format before #site. [Rick Olson]
e873071 @technoweenie Allow setting ActiveResource::Base#format before #site. [rick]
technoweenie authored
118
c54b915 @technoweenie Support agnostic formats when calling custom methods. Closes #10635 […
technoweenie authored
119 * Support agnostic formats when calling custom methods. Closes #10635 [joerichsen]
120
470fc02 @jeremy Document custom methods. Closes #10589.
jeremy authored
121 * Document custom methods. #10589 [Cheah Chu Yeow]
122
a1ec3aa @jeremy Ruby 1.9 compatibility
jeremy authored
123 * Ruby 1.9 compatibility. [Jeremy Kemper]
124
125
69edebf @dhh Prepare for 2.0.2 release
dhh authored
126 *2.0.2* (December 16th, 2007)
c81fff2 @jeremy Correct empty response handling. Closes #10445.
jeremy authored
127
1ceccde @dhh Added more specific exceptions for 400, 401, and 403 (all descending …
dhh authored
128 * Added more specific exceptions for 400, 401, and 403 (all descending from ClientError so existing rescues will work) #10326 [trek]
129
c81fff2 @jeremy Correct empty response handling. Closes #10445.
jeremy authored
130 * Correct empty response handling. #10445 [seangeo]
131
132
1acd54a @dhh Make ready for 2.0.1
dhh authored
133 *2.0.1* (December 7th, 2007)
54a75de @dhh Prep for RC2
dhh authored
134
24e6cbc @technoweenie Don't cache net/http object so that ActiveResource is more thread-saf…
technoweenie authored
135 * Don't cache net/http object so that ActiveResource is more thread-safe. Closes #10142 [kou]
136
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
137 * Update XML documentation examples to include explicit type attributes. Closes #9754 [Josh Susser]
7863c4a Update XML documentation examples to include explicit type attributes…
Marcel Molina authored
138
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
139 * Added one-off declarations of mock behavior [David Heinemeier Hansson]. Example:
dc399b9 @dhh Added ActiveResource.format= which defaults to :xml but can also be s…
dhh authored
140
141 Before:
142 ActiveResource::HttpMock.respond_to do |mock|
143 mock.get "/people/1.xml", {}, "<person><name>David</name></person>"
144 end
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
145
dc399b9 @dhh Added ActiveResource.format= which defaults to :xml but can also be s…
dhh authored
146 Now:
147 ActiveResource::HttpMock.respond_to.get "/people/1.xml", {}, "<person><name>David</name></person>"
148
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
149 * Added ActiveResource.format= which defaults to :xml but can also be set to :json [David Heinemeier Hansson]. Example:
dc399b9 @dhh Added ActiveResource.format= which defaults to :xml but can also be s…
dhh authored
150
151 class Person < ActiveResource::Base
152 self.site = "http://app/"
153 self.format = :json
154 end
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
155
dc399b9 @dhh Added ActiveResource.format= which defaults to :xml but can also be s…
dhh authored
156 person = Person.find(1) # => GET http://app/people/1.json
157 person.name = "David"
158 person.save # => PUT http://app/people/1.json {name: "David"}
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
159
dc399b9 @dhh Added ActiveResource.format= which defaults to :xml but can also be s…
dhh authored
160 Person.format = :xml
161 person.name = "Mary"
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
162 person.save # => PUT http://app/people/1.json <person><name>Mary</name></person>
dc399b9 @dhh Added ActiveResource.format= which defaults to :xml but can also be s…
dhh authored
163
e682fee @jeremy Fix reload error when path prefix is used. Closes #8727.
jeremy authored
164 * Fix reload error when path prefix is used. #8727 [Ian Warshak]
165
fde3d9d @jeremy Remove ActiveResource::Struct because it hasn't proven very useful. C…
jeremy authored
166 * Remove ActiveResource::Struct because it hasn't proven very useful. Creating a new ActiveResource::Base subclass is often less code and always clearer. #8612 [Josh Peek]
167
bfda4cd Fixed query methods on resources. [Cody Fauser]
Tobias Lütke authored
168 * Fix query methods on resources. [Cody Fauser]
169
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
170 * pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 [Eloy Duran]
4d1c87a @technoweenie pass the prefix_options to the instantiated record when using find wi…
technoweenie authored
171
849038e @jeremy Recognize and raise an exception on 405 Method Not Allowed responses.…
jeremy authored
172 * Recognize and raise an exception on 405 Method Not Allowed responses. #7692 [Josh Peek]
173
0873678 @technoweenie Handle string and symbol param keys when splitting params into prefix…
technoweenie authored
174 * Handle string and symbol param keys when splitting params into prefix params and query params.
175
176 Comment.find(:all, :params => { :article_id => 5, :page => 2 }) or Comment.find(:all, :params => { 'article_id' => 5, :page => 2 })
177
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
178 * Added find-one with symbol [David Heinemeier Hansson]. Example: Person.find(:one, :from => :leader) # => GET /people/leader.xml
04fd94d @dhh BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible …
dhh authored
179
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
180 * BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible with :params and more strict usage of scopes [David Heinemeier Hansson]. Changes:
04fd94d @dhh BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible …
dhh authored
181
182 Person.find(:all, :title => "CEO") ...becomes: Person.find(:all, :params => { :title => "CEO" })
183 Person.find(:managers) ...becomes: Person.find(:all, :from => :managers)
184 Person.find("/companies/1/manager.xml") ...becomes: Person.find(:one, :from => "/companies/1/manager.xml")
185
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
186 * Add support for setting custom headers per Active Resource model [Rick Olson]
bd50d82 @technoweenie Add support for setting custom headers per ActiveResource model [Rick]
technoweenie authored
187
188 class Project
8e8fd99 @technoweenie change #custom_headers to just #headers [Rick]
technoweenie authored
189 headers['X-Token'] = 'foo'
bd50d82 @technoweenie Add support for setting custom headers per ActiveResource model [Rick]
technoweenie authored
190 end
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
191
bd50d82 @technoweenie Add support for setting custom headers per ActiveResource model [Rick]
technoweenie authored
192 # makes the GET request with the custom X-Token header
193 Project.find(:all)
194
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
195 * Added find-by-path options to ActiveResource::Base.find [David Heinemeier Hansson]. Examples:
1d5c34c @dhh Added find-by-path options to ActiveResource::Base.find [DHH]
dhh authored
196
197 employees = Person.find(:all, :from => "/companies/1/people.xml") # => GET /companies/1/people.xml
198 manager = Person.find("/companies/1/manager.xml") # => GET /companies/1/manager.xml
199
200
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
201 * Added support for using classes from within a single nested module [David Heinemeier Hansson]. Example:
234b0b7 @dhh Added support for using classes from within a single nested module [DHH]
dhh authored
202
203 module Highrise
204 class Note < ActiveResource::Base
205 self.site = "http://37s.sunrise.i:3000"
206 end
207
208 class Comment < ActiveResource::Base
209 self.site = "http://37s.sunrise.i:3000"
210 end
211 end
212
213 assert_kind_of Highrise::Comment, Note.find(1).comments.first
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
214
234b0b7 @dhh Added support for using classes from within a single nested module [DHH]
dhh authored
215
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
216 * Added load_attributes_from_response as a way of loading attributes from other responses than just create [David Heinemeier Hansson]
37e8e35 @dhh Added load_attributes_from_response as a way of loading attributes fr…
dhh authored
217
218 class Highrise::Task < ActiveResource::Base
219 def complete
220 load_attributes_from_response(post(:complete))
221 end
222 end
223
224 ...will set "done_at" when complete is called.
225
226
9b8399f @dhh Added support for calling custom methods #6979 [rwdaigle]
dhh authored
227 * Added support for calling custom methods #6979 [rwdaigle]
228
229 Person.find(:managers) # => GET /people/managers.xml
230 Kase.find(1).post(:close) # => POST /kases/1/close.xml
231
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
232 * Remove explicit prefix_options parameter for ActiveResource::Base#initialize. [Rick Olson]
208d12d @technoweenie Remove explicit prefix_options parameter for ActiveResource::Base#ini…
technoweenie authored
233 ActiveResource splits the prefix_options from it automatically.
234
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
235 * Allow ActiveResource::Base.delete with custom prefix. [Rick Olson]
208d12d @technoweenie Remove explicit prefix_options parameter for ActiveResource::Base#ini…
technoweenie authored
236
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
237 * Add ActiveResource::Base#dup [Rick Olson]
208d12d @technoweenie Remove explicit prefix_options parameter for ActiveResource::Base#ini…
technoweenie authored
238
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
239 * Fixed constant warning when fetching the same object multiple times [David Heinemeier Hansson]
c97f329 @dhh Disregard namespaces from the default element name, so Highrise::Pers…
dhh authored
240
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
241 * Added that saves which get a body response (and not just a 201) will use that response to update themselves [David Heinemeier Hansson]
c97f329 @dhh Disregard namespaces from the default element name, so Highrise::Pers…
dhh authored
242
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
243 * Disregard namespaces from the default element name, so Highrise::Person will just try to fetch from "/people", not "/highrise/people" [David Heinemeier Hansson]
c97f329 @dhh Disregard namespaces from the default element name, so Highrise::Pers…
dhh authored
244
d97456d @jeremy Allow array and hash query parameters. Closes #7756.
jeremy authored
245 * Allow array and hash query parameters. #7756 [Greg Spurrier]
246
1b1ddf1 @jeremy Loading a resource preserves its prefix_options. Closes #7353. Silenc…
jeremy authored
247 * Loading a resource preserves its prefix_options. #7353 [Ryan Daigle]
248
f49e449 @technoweenie Carry over the convenience of #create from ActiveRecord. Closes #7340.…
technoweenie authored
249 * Carry over the convenience of #create from ActiveRecord. Closes #7340. [Ryan Daigle]
250
1bdb14b @technoweenie Increase ActiveResource::Base test coverage. Closes #7173, #7174 [Ric…
technoweenie authored
251 * Increase ActiveResource::Base test coverage. Closes #7173, #7174 [Rich Collins]
252
e00e6a2 @jeremy Interpret 422 Unprocessable Entity as ResourceInvalid. Closes #7097.
jeremy authored
253 * Interpret 422 Unprocessable Entity as ResourceInvalid. #7097 [dkubb]
254
932e7b0 @technoweenie Mega documentation patches. #7025, #7069 [rwdaigle]
technoweenie authored
255 * Mega documentation patches. #7025, #7069 [rwdaigle]
256
2bb33bb @jeremy Base.exists?(id, options) and Base#exists? check whether the resource…
jeremy authored
257 * Base.exists?(id, options) and Base#exists? check whether the resource is found. #6970 [rwdaigle]
258
4e57ac3 @jeremy Query string support. Closes #6855.
jeremy authored
259 * Query string support. [untext, Jeremy Kemper]
260 # GET /forums/1/topics.xml?sort=created_at
261 Topic.find(:all, :forum_id => 1, :sort => 'created_at')
262
c172154 @jeremy Base#==, eql?, and hash methods. == returns true if its argument is i…
jeremy authored
263 * 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]
264
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
265 * Allow subclassed resources to share the site info [Rick Olson, Jeremy Kemper]
2df386a @technoweenie why oh why do i always forget to save the changelog
technoweenie authored
266 d
011f4e7 @technoweenie Allow subclassed resources to share the site info [Rick]
technoweenie authored
267 class BeastResource < ActiveResource::Base
268 self.site = 'http://beast.caboo.se'
269 end
e6988ef @jeremy Subclasses share superclass site until explicitly set. This way you c…
jeremy authored
270
011f4e7 @technoweenie Allow subclassed resources to share the site info [Rick]
technoweenie authored
271 class Forum < BeastResource
272 # taken from BeastResource
273 # self.site = 'http://beast.caboo.se'
274 end
e6988ef @jeremy Subclasses share superclass site until explicitly set. This way you c…
jeremy authored
275
011f4e7 @technoweenie Allow subclassed resources to share the site info [Rick]
technoweenie authored
276 class Topic < BeastResource
e6988ef @jeremy Subclasses share superclass site until explicitly set. This way you c…
jeremy authored
277 self.site += '/forums/:forum_id'
011f4e7 @technoweenie Allow subclassed resources to share the site info [Rick]
technoweenie authored
278 end
279
55d4dbb @technoweenie Fix issues with ActiveResource collection handling. Closes #6291. [bm…
technoweenie authored
280 * Fix issues with ActiveResource collection handling. Closes #6291. [bmilekic]
281
1d31a04 Use attr_accessor_with_default to dry up attribute initialization. Re…
Marcel Molina authored
282 * Use attr_accessor_with_default to dry up attribute initialization. References #6538. [Stuart Halloway]
283
9c94438 @jamis Add basic logging support for logging outgoing requests.
jamis authored
284 * Add basic logging support for logging outgoing requests. [Jamis Buck]
285
6c0609f @jamis Add Base.delete for deleting resources without having to instantiate …
jamis authored
286 * Add Base.delete for deleting resources without having to instantiate them first. [Jamis Buck]
287
628838e @jamis Make #save behavior mimic AR::Base#save (true on success, false on fa…
jamis authored
288 * Make #save behavior mimic AR::Base#save (true on success, false on failure). [Jamis Buck]
289
7ac6ed8 @technoweenie Add Basic HTTP Authentication to ActiveResource (closes #6305). [jona…
technoweenie authored
290 * Add Basic HTTP Authentication to ActiveResource (closes #6305). [jonathan]
291
4d63e01 @technoweenie fixed failing tests now that non-GET requests are sent with .xml file…
technoweenie authored
292 * Extracted #id_from_response as an entry point for customizing how a created resource gets its own ID.
293 By default, it extracts from the Location response header.
294
0a84624 @jeremy Optimistic locking: raise ActiveResource::ResourceConflict on 409 Con…
jeremy authored
295 * Optimistic locking: raise ActiveResource::ResourceConflict on 409 Conflict response. [Jeremy Kemper]
296
297 # Example controller action
298 def update
299 @person.save!
300 rescue ActiveRecord::StaleObjectError
301 render :xml => @person.reload.to_xml, :status => '409 Conflict'
302 end
303
8d9e660 @technoweenie Basic validation support [Rick Olson]
technoweenie authored
304 * Basic validation support [Rick Olson]
305
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
306 Parses the xml response of ActiveRecord::Errors#to_xml with a similar interface to ActiveRecord::Errors.
307
8d9e660 @technoweenie Basic validation support [Rick Olson]
technoweenie authored
308 render :xml => @person.errors.to_xml, :status => '400 Validation Error'
309
c918fbf @jeremy Deep hashes are converted into collections of resources. Class attrib…
jeremy authored
310 * Deep hashes are converted into collections of resources. [Jeremy Kemper]
311 Person.new :name => 'Bob',
312 :address => { :id => 1, :city => 'Portland' },
313 :contacts => [{ :id => 1 }, { :id => 2 }]
314 Looks for Address and Contact resources and creates them if unavailable.
315 So clients can fetch a complex resource in a single request if you e.g.
316 render :xml => @person.to_xml(:include => [:address, :contacts])
317 in your controller action.
318
7749c9c @technoweenie Major updates to ActiveResource, please see changelog and unit tests …
technoweenie authored
319 * Major updates [Rick Olson]
320
321 * Add full support for find/create/update/destroy
322 * Add support for specifying prefixes.
323 * Allow overriding of element_name, collection_name, and primary key
324 * Provide simpler HTTP mock interface for testing
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
325
7749c9c @technoweenie Major updates to ActiveResource, please see changelog and unit tests …
technoweenie authored
326 # rails routing code
327 map.resources :posts do |post|
328 post.resources :comments
329 end
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
330
7749c9c @technoweenie Major updates to ActiveResource, please see changelog and unit tests …
technoweenie authored
331 # ActiveResources
332 class Post < ActiveResource::Base
333 self.site = "http://37s.sunrise.i:3000/"
334 end
335
336 class Comment < ActiveResource::Base
337 self.site = "http://37s.sunrise.i:3000/posts/:post_id/"
338 end
3270c58 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored
339
7749c9c @technoweenie Major updates to ActiveResource, please see changelog and unit tests …
technoweenie authored
340 @post = Post.find 5
341 @comments = Comment.find :all, :post_id => @post.id
342
343 @comment = Comment.new({:body => 'hello world'}, {:post_id => @post.id})
344 @comment.save
345
f9b3694 @jeremy 200...400 are valid response codes. PUT and POST request bodies defau…
jeremy authored
346 * 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
347
46c7dd2 @fxn normalize author names in changelogs [#1495 state:committed]
fxn authored
348 * Initial checkin: object-oriented client for restful HTTP resources which follow the Rails convention. [David Heinemeier Hansson]
Something went wrong with that request. Please try again.