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

Changeset 4663

Show
Ignore:
Timestamp:
08/05/06 01:39:57 (2 years ago)
Author:
bitsweat
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/CHANGELOG

    r4655 r4663  
    11*SVN* 
     2 
     3* Fix announcement of very long migration names.  #5722 [blake@near-time.com] 
    24 
    35* The exists? class method should treat a string argument as an id rather than as conditions.  #5698 [jeremy@planetargon.com] 
  • trunk/activerecord/lib/active_record/migration.rb

    r4596 r4663  
    245245      def announce(message) 
    246246        text = "#{name}: #{message}" 
    247         write "== %s %s" % [ text, "=" * (75 - text.length) ] 
     247        length = [0, 75 - text.length].max 
     248        write "== %s %s" % [text, "=" * length] 
    248249      end 
    249250