diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/3_1_release_notes.textile | 2 | ||||
-rw-r--r-- | railties/guides/source/index.html.erb | 4 | ||||
-rw-r--r-- | railties/guides/source/layout.html.erb | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/railties/guides/source/3_1_release_notes.textile b/railties/guides/source/3_1_release_notes.textile index 156987efc4..00765239d6 100644 --- a/railties/guides/source/3_1_release_notes.textile +++ b/railties/guides/source/3_1_release_notes.textile @@ -346,6 +346,7 @@ has_many :things, :conditions => proc { "foo = #{bar}" } # after Inside the proc, +self+ is the object which is the owner of the association, unless you are eager loading the association, in which case +self+ is the class which the association is within. You can have any "normal" conditions inside the proc, so the following will work too: + <ruby> has_many :things, :conditions => proc { ["foo = ?", bar] } </ruby> @@ -353,6 +354,7 @@ has_many :things, :conditions => proc { ["foo = ?", bar] } * Previously +:insert_sql+ and +:delete_sql+ on +has_and_belongs_to_many+ association allowed you to call 'record' to get the record being inserted or deleted. This is now passed as an argument to the proc. * Added <tt>ActiveRecord::Base#has_secure_password</tt> (via <tt>ActiveModel::SecurePassword</tt>) to encapsulate dead-simple password usage with BCrypt encryption and salting. + <ruby> # Schema: User(name:string, password_digest:string, password_salt:string) class User < ActiveRecord::Base diff --git a/railties/guides/source/index.html.erb b/railties/guides/source/index.html.erb index b7813086d7..214155c088 100644 --- a/railties/guides/source/index.html.erb +++ b/railties/guides/source/index.html.erb @@ -174,6 +174,10 @@ Ruby on Rails Guides <h3>Release Notes</h3> <dl> +<%= guide("Ruby on Rails 3.1 Release Notes", '3_1_release_notes.html') do %> + <p>Release notes for Rails 3.1.</p> +<% end %> + <%= guide("Ruby on Rails 3.0 Release Notes", '3_0_release_notes.html') do %> <p>Release notes for Rails 3.0.</p> <% end %> diff --git a/railties/guides/source/layout.html.erb b/railties/guides/source/layout.html.erb index 5f8ee57517..3ccbc3a477 100644 --- a/railties/guides/source/layout.html.erb +++ b/railties/guides/source/layout.html.erb @@ -84,6 +84,7 @@ <dd><a href="ruby_on_rails_guides_guidelines.html">Ruby on Rails Guides Guidelines</a></dd> <dt>Release Notes</dt> + <dd><a href="3_1_release_notes.html">Ruby on Rails 3.1 Release Notes</a></dd> <dd><a href="3_0_release_notes.html">Ruby on Rails 3.0 Release Notes</a></dd> <dd><a href="2_3_release_notes.html">Ruby on Rails 2.3 Release Notes</a></dd> <dd><a href="2_2_release_notes.html">Ruby on Rails 2.2 Release Notes</a></dd> |