diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-05 01:39:57 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-05 01:39:57 +0000 |
commit | 604eb8ab9555da2c539fa8448625593013de3a00 (patch) | |
tree | 50186cdb54e71f72183eb7d1b41a4724c266508c /activerecord/lib | |
parent | c1c940feb719ffff9f1bd93e62c85d998ad22208 (diff) | |
download | rails-604eb8ab9555da2c539fa8448625593013de3a00.tar.gz rails-604eb8ab9555da2c539fa8448625593013de3a00.tar.bz2 rails-604eb8ab9555da2c539fa8448625593013de3a00.zip |
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
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index ffb4ffd030..acafda0048 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -244,7 +244,8 @@ module ActiveRecord 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) |