Skip to content
Browse files

Fix announcement of very long migration names. Closes #5722.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c1c940f commit 604eb8ab9555da2c539fa8448625593013de3a00 @jeremy jeremy committed Aug 5, 2006
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 @@
*SVN*
+* Fix announcement of very long migration names. #5722 [blake@near-time.com]
+
* The exists? class method should treat a string argument as an id rather than as conditions. #5698 [jeremy@planetargon.com]
* Fixed to_xml with :include misbehaviors when invoked on array of model instances #5690 [alexkwolfe@gmail.com]
View
3 activerecord/lib/active_record/migration.rb
@@ -244,7 +244,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 604eb8a

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