Bugfixes and Rails Edge

Update to Rails 2.3.1.
  (Actually, not quite. Doesn't look like 2.3.1 will be released
   today, but I REALLY want to push these bugfixes out.)
Removed bundled Rack (Rails 2.3.1 comes bundled with Rack 1.0).
Add
     config.action_view.cache_template_loading = true
  to production environment.
Fix FastCGI bug (http://rubyforge.org/tracker/index.php?func=detail&aid=24191&group_id=186&atid=783).
Fix WikiWords bug (http://rubyforge.org/pipermail/instiki-users/2009-February/001181.html).
This commit is contained in:
Jacques Distler 2009-02-27 19:23:00 -06:00
parent 0ddef97328
commit 133c21b801
641 changed files with 20541 additions and 71675 deletions

View file

@ -462,7 +462,7 @@ module ActiveResource
# that_guy.valid? # => false
# that_guy.new? # => true
def create(attributes = {})
returning(self.new(attributes)) { |res| res.save }
self.new(attributes).tap { |resource| resource.save }
end
# Core method for finding resources. Used similarly to Active Record's +find+ method.
@ -600,7 +600,7 @@ module ActiveResource
end
def instantiate_record(record, prefix_options = {})
returning new(record) do |resource|
new(record).tap do |resource|
resource.prefix_options = prefix_options
end
end
@ -747,7 +747,7 @@ module ActiveResource
#
def ==(other)
other.equal?(self) || (other.instance_of?(self.class) && other.id == id && other.prefix_options == prefix_options)
end
end
# Tests for equality (delegates to ==).
def eql?(other)
@ -773,7 +773,7 @@ module ActiveResource
# my_invoice.customer # => That Company
# next_invoice.customer # => That Company
def dup
returning self.class.new do |resource|
self.class.new.tap do |resource|
resource.attributes = @attributes
resource.prefix_options = @prefix_options
end
@ -985,14 +985,14 @@ module ActiveResource
# Update the resource on the remote service.
def update
returning connection.put(element_path(prefix_options), encode, self.class.headers) do |response|
connection.put(element_path(prefix_options), encode, self.class.headers).tap do |response|
load_attributes_from_response(response)
end
end
# Create (i.e., \save to the remote service) the \new resource.
def create
returning connection.post(collection_path, encode, self.class.headers) do |response|
connection.post(collection_path, encode, self.class.headers).tap do |response|
self.id = id_from_response(response)
load_attributes_from_response(response)
end