mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add some more info to the release notes
This commit is contained in:
parent
d224e6ccb1
commit
f8079b815b
2 changed files with 54 additions and 1 deletions
|
@ -229,6 +229,8 @@ ul#navMain {
|
||||||
|
|
||||||
<li><a href="#_new_dynamic_finders">New Dynamic Finders</a></li>
|
<li><a href="#_new_dynamic_finders">New Dynamic Finders</a></li>
|
||||||
|
|
||||||
|
<li><a href="#_associations_respect_private_protected_scope">Associations Respect Private/Protected Scope</a></li>
|
||||||
|
|
||||||
<li><a href="#_other_activerecord_changes">Other ActiveRecord Changes</a></li>
|
<li><a href="#_other_activerecord_changes">Other ActiveRecord Changes</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -502,6 +504,11 @@ More information :
|
||||||
<div class="ilist"><ul>
|
<div class="ilist"><ul>
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
|
<a href="http://m.onkey.org/2008/10/23/thread-safety-for-your-rails">Thread safety for your Rails</a>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>
|
||||||
<a href="http://weblog.rubyonrails.org/2008/8/16/josh-peek-officially-joins-the-rails-core">Thread safety project announcement</a>
|
<a href="http://weblog.rubyonrails.org/2008/8/16/josh-peek-officially-joins-the-rails-core">Thread safety project announcement</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
@ -640,7 +647,16 @@ Lead Contributor: <a href="http://blog.hasmanythrough.com">Josh Susser</a>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul></div>
|
</ul></div>
|
||||||
<h3 id="_other_activerecord_changes">5.5. Other ActiveRecord Changes</h3>
|
<h3 id="_associations_respect_private_protected_scope">5.5. Associations Respect Private/Protected Scope</h3>
|
||||||
|
<div class="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>
|
||||||
|
<div class="ilist"><ul>
|
||||||
|
<li>
|
||||||
|
<p>
|
||||||
|
Lead Contributor: Adam Milligan
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
<h3 id="_other_activerecord_changes">5.6. Other ActiveRecord Changes</h3>
|
||||||
<div class="ilist"><ul>
|
<div class="ilist"><ul>
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
|
@ -1045,6 +1061,24 @@ Wrapped <tt>Rails.env</tt> in <tt>StringQuestioneer</tt> so you can do <tt>Rails
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
|
Implicit local assignments when rendering partials has been deprecated.
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
<div class="listingblock">
|
||||||
|
<div class="content"><!-- Generator: GNU source-highlight 2.9
|
||||||
|
by Lorenzo Bettini
|
||||||
|
http://www.lorenzobettini.it
|
||||||
|
http://www.gnu.org/software/src-highlite -->
|
||||||
|
<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">def</span></span> partial_with_implicit_local_assignment
|
||||||
|
<span style="color: #009900">@customer</span> <span style="color: #990000">=</span> Customer<span style="color: #990000">.</span>new<span style="color: #990000">(</span><span style="color: #FF0000">"Marcel"</span><span style="color: #990000">)</span>
|
||||||
|
render <span style="color: #990000">:</span>partial <span style="color: #990000">=></span> <span style="color: #FF0000">"customer"</span>
|
||||||
|
<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
|
||||||
|
</tt></pre></div></div>
|
||||||
|
<div class="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>
|
||||||
|
<div class="ilist"><ul>
|
||||||
|
<li>
|
||||||
|
<p>
|
||||||
<tt>country_select</tt> has been removed. See the <a href="http://www.rubyonrails.org/deprecation/list-of-countries">deprecation page</a> for more information and a plugin replacement.
|
<tt>country_select</tt> has been removed. See the <a href="http://www.rubyonrails.org/deprecation/list-of-countries">deprecation page</a> for more information and a plugin replacement.
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -108,6 +108,7 @@ config.threadsafe!
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
|
||||||
* More information :
|
* More information :
|
||||||
|
- link:http://m.onkey.org/2008/10/23/thread-safety-for-your-rails[Thread safety for your Rails]
|
||||||
- link:http://weblog.rubyonrails.org/2008/8/16/josh-peek-officially-joins-the-rails-core[Thread safety project announcement]
|
- link:http://weblog.rubyonrails.org/2008/8/16/josh-peek-officially-joins-the-rails-core[Thread safety project announcement]
|
||||||
- link:http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html[Q/A: What Thread-safe Rails Means]
|
- 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]
|
* 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
|
=== Other ActiveRecord Changes
|
||||||
|
|
||||||
* +rake db:migrate:redo+ now accepts an optional VERSION to target that specific migration to redo
|
* +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+
|
* +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.
|
* +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.
|
||||||
|
|
||||||
|
[source, ruby]
|
||||||
|
-------------------------------------------------------
|
||||||
|
def partial_with_implicit_local_assignment
|
||||||
|
@customer = Customer.new("Marcel")
|
||||||
|
render :partial => "customer"
|
||||||
|
end
|
||||||
|
-------------------------------------------------------
|
||||||
|
|
||||||
|
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.
|
* +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::Base.allow_concurrency+ no longer has any effect.
|
||||||
* +ActiveRecord::Errors.default_error_messages+ has been deprecated in favor of +I18n.translate('activerecord.errors.messages')+
|
* +ActiveRecord::Errors.default_error_messages+ has been deprecated in favor of +I18n.translate('activerecord.errors.messages')+
|
||||||
|
|
Loading…
Reference in a new issue