From b5a2f24b6b2b466a5692f0d46b4a2b8154ee0e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 4 Jul 2012 08:23:51 -0300 Subject: Update 4.0 Release Notes Related with 17d2115e3df6caf15d554b44e28177069fa3ed5b --- guides/source/4_0_release_notes.textile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/4_0_release_notes.textile b/guides/source/4_0_release_notes.textile index e1d6b42e6c..d430dca164 100644 --- a/guides/source/4_0_release_notes.textile +++ b/guides/source/4_0_release_notes.textile @@ -329,6 +329,20 @@ Moved into a separate gem sprockets-rails. h3. Active Record +* Add add_reference and remove_reference schema statements. Aliases, add_belongs_to and remove_belongs_to are acceptable. References are reversible. + + +# Create a user_id column +add_reference(:products, :user) + +# Create a supplier_id, supplier_type columns and appropriate index +add_reference(:products, :supplier, polymorphic: true, index: true) + +# Remove polymorphic reference +remove_reference(:products, :supplier, polymorphic: true) + + + * Add :default and :null options to column_exists?. @@ -343,7 +357,7 @@ User.where(:age => 30) # => returns the relation User.where(:age => 30).to_a # => executes the query and returns the loaded objects, as before -* Add collation and ctype support to PostgreSQL. These are available for PostgreSQL 8.4 or later. +* Add :collation and :ctype support to PostgreSQL. These are available for PostgreSQL 8.4 or later. development: -- cgit v1.2.3