Skip to content

Commit

Permalink
release notes: adds a couple of blank lines to get the markup right
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Aug 31, 2011
1 parent 73263f6 commit d7be97e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions railties/guides/source/3_1_release_notes.textile
Expand Up @@ -346,13 +346,15 @@ 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>

* 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
Expand Down

0 comments on commit d7be97e

Please sign in to comment.