<divclass="para"><p>Active Record association proxies now respect the scope of methods on the proxied object. Previously (given User has_one :account) <tt>@user.account.private_method</tt> would call the private method on the associated Account object. That fails in Rails 2.2; if you need this functionality, you should use <tt>@user.account.send(:private_method)</tt> (or make the method public instead of private or protected). Please note that if you're overriding <tt>method_missing</tt>, you should also override <tt>respond_to</tt> to match the behavior in order for associations to function normally.</p></div>
<divclass="ilist"><ul>
<li>
<p>
Lead Contributor: Adam Milligan
</p>
</li>
</ul></div>
<h3id="_other_activerecord_changes">5.6. Other ActiveRecord Changes</h3>
<divclass="ilist"><ul>
<li>
<p>
...
...
@@ -1045,6 +1061,24 @@ Wrapped <tt>Rails.env</tt> in <tt>StringQuestioneer</tt> so you can do <tt>Rails
</li>
<li>
<p>
Implicit local assignments when rendering partials has been deprecated.
</p>
</li>
</ul></div>
<divclass="listingblock">
<divclass="content"><!-- Generator: GNU source-highlight 2.9
<divclass="para"><p>Previously the above code made available a local variable called <tt>customer</tt> available inside the partial <em>customer</em>. You should explicitly pass all the variables via :locals hash now.</p></div>
<divclass="ilist"><ul>
<li>
<p>
<tt>country_select</tt> has been removed. See the <ahref="http://www.rubyonrails.org/deprecation/list-of-countries">deprecation page</a> for more information and a plugin replacement.
- link:http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html[Q/A: What Thread-safe Rails Means]
...
...
@@ -191,6 +192,12 @@ User.find_by_name!('Moby')
* Lead Contributor: link:http://blog.hasmanythrough.com[Josh Susser]
=== Associations Respect Private/Protected Scope
Active Record association proxies now respect the scope of methods on the proxied object. Previously (given User has_one :account) +@user.account.private_method+ would call the private method on the associated Account object. That fails in Rails 2.2; if you need this functionality, you should use +@user.account.send(:private_method)+ (or make the method public instead of private or protected). Please note that if you're overriding +method_missing+, you should also override +respond_to+ to match the behavior in order for associations to function normally.
* Lead Contributor: Adam Milligan
=== Other ActiveRecord Changes
* +rake db:migrate:redo+ now accepts an optional VERSION to target that specific migration to redo
...
...
@@ -384,6 +391,18 @@ A few pieces of older code are deprecated in this release:
* +Rails::SecretKeyGenerator+ has been replaced by +ActiveSupport::SecureRandom+
* +render_component+ is deprecated. There's a link:http://github.com/rails/render_component/tree/master[render_components plugin] available if you need this functionality.
* Implicit local assignments when rendering partials has been deprecated.
Previously the above code made available a local variable called +customer+ available inside the partial 'customer'. You should explicitly pass all the variables via :locals hash now.
* +country_select+ has been removed. See the link:http://www.rubyonrails.org/deprecation/list-of-countries[deprecation page] for more information and a plugin replacement.
* +ActiveRecord::Base.allow_concurrency+ no longer has any effect.
* +ActiveRecord::Errors.default_error_messages+ has been deprecated in favor of +I18n.translate('activerecord.errors.messages')+