Skip to content

Commit

Permalink
Fixed comments of add_foreign_key method
Browse files Browse the repository at this point in the history
The comments of add_foreign_key method was displaying incorrect constraint name.
  • Loading branch information
salmanasiddiqui committed Mar 10, 2016
1 parent 841c74c commit 56570eb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ def foreign_keys(table_name)
#
# generates:
#
# ALTER TABLE "articles" ADD CONSTRAINT articles_author_id_fk FOREIGN KEY ("author_id") REFERENCES "authors" ("id")
# ALTER TABLE "articles" ADD CONSTRAINT fk_rails_e74ce85cbc FOREIGN KEY ("author_id") REFERENCES "authors" ("id")
#
# ====== Creating a foreign key on a specific column
#
Expand All @@ -870,7 +870,7 @@ def foreign_keys(table_name)
#
# generates:
#
# ALTER TABLE "articles" ADD CONSTRAINT articles_author_id_fk FOREIGN KEY ("author_id") REFERENCES "authors" ("id") ON DELETE CASCADE
# ALTER TABLE "articles" ADD CONSTRAINT fk_rails_e74ce85cbc FOREIGN KEY ("author_id") REFERENCES "authors" ("id") ON DELETE CASCADE
#
# The +options+ hash can include the following keys:
# [<tt>:column</tt>]
Expand Down

0 comments on commit 56570eb

Please sign in to comment.