Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4703

Show
Ignore:
Timestamp:
08/07/06 06:25:01 (2 years ago)
Author:
marcel
Message:

Fix announcement of very long migration names. #5722 [blake@near-time.com] Backported from trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/stable/activerecord/CHANGELOG

    r4702 r4703  
    11*1.14.3* (June 27th, 2006) 
     2 
     3* Fix announcement of very long migration names.  #5722 [blake@near-time.com] 
    24 
    35* Update callbacks documentation. #3970 [Robby Russell <robby@planetargon.com>] 
  • branches/stable/activerecord/lib/active_record/migration.rb

    r4120 r4703  
    244244      def announce(message) 
    245245        text = "#{name}: #{message}" 
    246         write "== %s %s" % [ text, "=" * (75 - text.length) ] 
     246        length = [0, 75 - text.length].max 
     247        write "== %s %s" % [text, "=" * length] 
    247248      end 
    248249