diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index e3e6be375f..550e5adb3a 100644 --- a/activerecord/CHANGELOG +++ b/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] 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) |