diff options
Diffstat (limited to 'guides/source/4_0_release_notes.textile')
-rw-r--r-- | guides/source/4_0_release_notes.textile | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/guides/source/4_0_release_notes.textile b/guides/source/4_0_release_notes.textile index 2f21f8cc71..0e03779e0d 100644 --- a/guides/source/4_0_release_notes.textile +++ b/guides/source/4_0_release_notes.textile @@ -479,35 +479,10 @@ end User.stored_attributes[:settings] # [:color, :homepage] </ruby> -* <tt>composed_of</tt> was removed. You'll have to write your own accessor and mutator methods if you'd like to use value objects to represent some portion of your models. So, instead of: - -<ruby> -class Person < ActiveRecord::Base - composed_of :address, :mapping => [ %w(address_street street), %w(address_city city) ] -end -</ruby> - -you could write something like this: - -<ruby> -def address - @address ||= Address.new(address_street, address_city) -end - -def address=(address) - self[:address_street] = @address.street - self[:address_city] = @address.city - - @address = address -end -</ruby> - * PostgreSQL default log level is now 'warning', to bypass the noisy notice messages. You can change the log level using the <tt>min_messages</tt> option available in your <tt>config/database.yml</tt>. * Add uuid datatype support to PostgreSQL adapter. -* <tt>update_attribute</tt> has been removed. Use <tt>update_column</tt> if you want to bypass mass-assignment protection, validations, callbacks, and touching of updated_at. Otherwise please use <tt>update_attributes</tt>. - * Added <tt>ActiveRecord::Migration.check_pending!</tt> that raises an error if migrations are pending. * Added <tt>#destroy!</tt> which acts like <tt>#destroy</tt> but will raise an <tt>ActiveRecord::RecordNotDestroyed</tt> exception instead of returning <tt>false</tt>. @@ -730,6 +705,8 @@ where(...).remove_conditions # => still has conditions * The migration generator now creates a join table with (commented) indexes every time the migration name contains the word "join_table". +* <tt>ActiveRecord::SessionStore</tt> is removed from Rails 4.0 and is now a separate "gem":https://github.com/rails/activerecord-session_store. + h3. Active Model * Changed <tt>AM::Serializers::JSON.include_root_in_json</tt> default value to false. Now, AM Serializers and AR objects have the same default behaviour. |