aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-10-24 21:39:04 +0530
committerPratik Naik <pratiknaik@gmail.com>2008-10-24 21:39:04 +0530
commit6b41e0257a332de97777424e7c96cd9b8bb8db2b (patch)
treeeb3e71cc856adbc8f64188111a5437008c0f73c1 /railties
parent9ae15df21c3c3be4f46759b41a752f5b05333196 (diff)
parenta17fc20eb122d45a017e99e592e5e159025ab26b (diff)
downloadrails-6b41e0257a332de97777424e7c96cd9b8bb8db2b.tar.gz
rails-6b41e0257a332de97777424e7c96cd9b8bb8db2b.tar.bz2
rails-6b41e0257a332de97777424e7c96cd9b8bb8db2b.zip
Merge commit 'mainstream/master'
Conflicts: railties/doc/guides/html/2_2_release_notes.html railties/doc/guides/source/2_2_release_notes.txt
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/Rakefile16
-rw-r--r--railties/doc/guides/html/2_2_release_notes.html38
-rw-r--r--railties/doc/guides/source/2_2_release_notes.txt23
4 files changed, 66 insertions, 13 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 51d66e4c01..390da3b890 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,4 +1,4 @@
-*Edge*
+*2.2.0 [RC1] (October 24th, 2008)*
* Fixed that sqlite would report "db/development.sqlite3 already exists" whether true or not on db:create #614 [Antonio Cangiano]
diff --git a/railties/Rakefile b/railties/Rakefile
index 5100b4bd9b..adb6db0b64 100644
--- a/railties/Rakefile
+++ b/railties/Rakefile
@@ -348,12 +348,12 @@ spec = Gem::Specification.new do |s|
on top of either MySQL, PostgreSQL, SQLite, DB2, SQL Server, or Oracle with eRuby- or Builder-based templates.
EOF
- s.add_dependency('rake', '>= 0.8.1')
- s.add_dependency('activesupport', '= 2.1.0' + PKG_BUILD)
- s.add_dependency('activerecord', '= 2.1.0' + PKG_BUILD)
- s.add_dependency('actionpack', '= 2.1.0' + PKG_BUILD)
- s.add_dependency('actionmailer', '= 2.1.0' + PKG_BUILD)
- s.add_dependency('activeresource', '= 2.1.0' + PKG_BUILD)
+ s.add_dependency('rake', '>= 0.8.3')
+ s.add_dependency('activesupport', '= 2.2.0' + PKG_BUILD)
+ s.add_dependency('activerecord', '= 2.2.0' + PKG_BUILD)
+ s.add_dependency('actionpack', '= 2.2.0' + PKG_BUILD)
+ s.add_dependency('actionmailer', '= 2.2.0' + PKG_BUILD)
+ s.add_dependency('activeresource', '= 2.2.0' + PKG_BUILD)
s.rdoc_options << '--exclude' << '.'
s.has_rdoc = false
@@ -378,8 +378,8 @@ end
# Publishing -------------------------------------------------------
desc "Publish the rails gem"
task :pgem => [:gem] do
- Rake::SshFilePublisher.new("wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
- `ssh wrath.rubyonrails.org './gemupdate.sh'`
+ Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
+ `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
end
desc "Publish the API documentation"
diff --git a/railties/doc/guides/html/2_2_release_notes.html b/railties/doc/guides/html/2_2_release_notes.html
index e30145c90f..c657be20b4 100644
--- a/railties/doc/guides/html/2_2_release_notes.html
+++ b/railties/doc/guides/html/2_2_release_notes.html
@@ -229,6 +229,8 @@ ul#navMain {
<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>
</ul>
@@ -422,7 +424,7 @@ Lead Contributors: <a href="http://guides.rails.info/authors.html">Rails Documen
</li>
<li>
<p>
-Major contributions from <a href="http://advogato.org/person/fxn/diary.html">Xavier Nora</a> and <a href="http://izumi.plan99.net/blog/">Hongli Lai</a>.
+Major contributions from <a href="http://advogato.org/person/fxn/diary.html">Xavier Noria</a> and <a href="http://izumi.plan99.net/blog/">Hongli Lai</a>.
</p>
</li>
<li>
@@ -502,6 +504,11 @@ More information :
<div class="ilist"><ul>
<li>
<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>
</p>
</li>
@@ -640,7 +647,16 @@ Lead Contributor: <a href="http://blog.hasmanythrough.com">Josh Susser</a>
</p>
</li>
</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>
<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>
+<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">=&gt;</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> 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.
</p>
</li>
diff --git a/railties/doc/guides/source/2_2_release_notes.txt b/railties/doc/guides/source/2_2_release_notes.txt
index 57037e04e9..00243d6941 100644
--- a/railties/doc/guides/source/2_2_release_notes.txt
+++ b/railties/doc/guides/source/2_2_release_notes.txt
@@ -54,7 +54,7 @@ rake doc:guides
This will put the guides inside +RAILS_ROOT/doc/guides+ and you may start surfing straight away by opening +RAILS_ROOT/doc/guides/index.html+ in your favourite browser.
* Lead Contributors: link:http://guides.rails.info/authors.html[Rails Documentation Team]
-* Major contributions from link:http://advogato.org/person/fxn/diary.html[Xavier Nora] and link:http://izumi.plan99.net/blog/[Hongli Lai].
+* Major contributions from link:http://advogato.org/person/fxn/diary.html[Xavier Noria] and link:http://izumi.plan99.net/blog/[Hongli Lai].
* More information:
- link:http://hackfest.rubyonrails.org/guide[Rails Guides hackfest]
- link:http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch[Help improve Rails documentation on Git branch]
@@ -108,6 +108,7 @@ config.threadsafe!
-------------------------------------------------------
* 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://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.
+
+[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+ 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')+
@@ -393,4 +412,4 @@ A few pieces of older code are deprecated in this release:
== Credits
-Release notes compiled by link:http://afreshcup.com[Mike Gunderloy] \ No newline at end of file
+Release notes compiled by link:http://afreshcup.com[Mike Gunderloy]