diff options
-rw-r--r-- | actionpack/CHANGELOG.md | 2 | ||||
-rw-r--r-- | actionpack/actionpack.gemspec | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/class/attribute.rb | 15 |
4 files changed, 6 insertions, 17 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 0c1228b7c6..c992f1388a 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,5 +1,7 @@ ## Rails 3.2.0 (unreleased) ## +* Depends on rack ~> 1.4.0 *Santiago Pastorino* + * Add :gzip option to `caches_page`. The default option can be configured globally using `page_cache_compression` *Andrey Sitnik* * The ShowExceptions middleware now accepts a exceptions application that is responsible to render an exception when the application fails. The application is invoked with a copy of the exception in `env["action_dispatch.exception"]` and with the PATH_INFO rewritten to the status code. *José Valim* diff --git a/actionpack/actionpack.gemspec b/actionpack/actionpack.gemspec index fe5bed70a9..28ad881eeb 100644 --- a/actionpack/actionpack.gemspec +++ b/actionpack/actionpack.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.add_dependency('activemodel', version) s.add_dependency('rack-cache', '~> 1.1') s.add_dependency('builder', '~> 3.0.0') - s.add_dependency('rack', '~> 1.3.5') + s.add_dependency('rack', '~> 1.4.0') s.add_dependency('rack-test', '~> 0.6.1') s.add_dependency('journey', '~> 1.0.0.rc1') s.add_dependency('sprockets', '~> 2.1.2') diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index c281bead0d..c0fe6836aa 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -63,10 +63,10 @@ module ActiveRecord # => [#<Model field: "value", other_field: "value", and_one_more: "value">] # # Any attributes that do not have fields retrieved by a select - # will return `nil` when the getter method for that attribute is used: + # will raise a ActiveModel::MissingAttributeError when the getter method for that attribute is used: # # >> Model.select(:field).first.other_field - # => nil + # => ActiveModel::MissingAttributeError: missing attribute: other_field def select(value = Proc.new) if block_given? to_a.select {|*block_args| value.call(*block_args) } diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index 45bec264ff..a04445d34d 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -81,21 +81,13 @@ class Class define_method(:#{name}) { val } end - if singleton_class? - class_eval do - remove_possible_method(:#{name}) - def #{name} - defined?(@#{name}) ? @#{name} : singleton_class.#{name} - end - end - end val end if instance_reader remove_possible_method :#{name} def #{name} - defined?(@#{name}) ? @#{name} : self.class.#{name} + defined?(@#{name}) ? @#{name} : singleton_class.#{name} end def #{name}? @@ -107,9 +99,4 @@ class Class attr_writer name if instance_writer end end - - private - def singleton_class? - !name || '' == name - end end |