Skip to content
This repository
Browse code

Add changelog entry for references statements

  • Loading branch information...
commit 17d2115e3df6caf15d554b44e28177069fa3ed5b 1 parent 68f0ef9
Aleksey Magusev authored July 02, 2012 rafaelfranca committed July 03, 2012

Showing 1 changed file with 13 additions and 0 deletions. Show diff stats Hide diff stats

  1. 13  activerecord/CHANGELOG.md
13  activerecord/CHANGELOG.md
Source Rendered
... ...
@@ -1,5 +1,18 @@
1 1
 ## Rails 4.0.0 (unreleased) ##
2 2
 
  3
+*   Add `add_reference` and `remove_reference` schema statements. Aliases, `add_belongs_to`
  4
+    and `remove_belongs_to` are acceptable. References are reversible.
  5
+		Examples:
  6
+
  7
+        # Create a user_id column
  8
+        add_reference(:products, :user)
  9
+				# Create a supplier_id, supplier_type columns and appropriate index
  10
+        add_reference(:products, :supplier, polymorphic: true, index: true)
  11
+        # Remove polymorphic reference
  12
+        remove_reference(:products, :supplier, polymorphic: true)
  13
+
  14
+    *Aleksey Magusev*
  15
+
3 16
 *   Add `:default` and `:null` options to `column_exists?`.
4 17
 
5 18
         column_exists?(:testings, :taggable_id, :integer, null: false)

3 notes on commit 17d2115

Rafael Mendonça França
Owner

@vijaydev should I add this to the Release Notes?

Vijay Dev
Collaborator

Yes please.

Rafael Mendonça França
Owner

Done at b5a2f24

Please sign in to comment.
Something went wrong with that request. Please try again.