Skip to content
Browse files

Fix announcement of very long migration names. #5722 [blake@near-time…

….com] Backported from trunk.

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@4703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 171aa5c commit 817ace4d103a0c9e0d87f92584fbe209800ba80f Marcel Molina committed
Showing with 4 additions and 1 deletion.
  1. +2 −0 activerecord/CHANGELOG
  2. +2 −1 activerecord/lib/active_record/migration.rb
View
2 activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*1.14.3* (June 27th, 2006)
+* Fix announcement of very long migration names. #5722 [blake@near-time.com]
+
* Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>]
* Properly quote index names in migrations (closes #4764) [John Long]
View
3 activerecord/lib/active_record/migration.rb
@@ -243,7 +243,8 @@ def write(text="")
def announce(message)
text = "#{name}: #{message}"
- write "== %s %s" % [ text, "=" * (75 - text.length) ]
+ length = [0, 75 - text.length].max
+ write "== %s %s" % [text, "=" * length]
end
def say(message, subitem=false)

0 comments on commit 817ace4

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