diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-03-14 17:43:59 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-15 08:57:41 -0700 |
commit | 5de3698e2be1438d0fdc2b4ef2fe6adf0b94b343 (patch) | |
tree | 261726834da8a92774a49175be3345f7f7a5f93d /activerecord/lib/active_record/migration.rb | |
parent | 96bc6bcfee704701de1a9c4c3c6a7c265610d34d (diff) | |
download | rails-5de3698e2be1438d0fdc2b4ef2fe6adf0b94b343.tar.gz rails-5de3698e2be1438d0fdc2b4ef2fe6adf0b94b343.tar.bz2 rails-5de3698e2be1438d0fdc2b4ef2fe6adf0b94b343.zip |
cleaning up many more warnings in activerecord [#4180 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/migration.rb')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index fd5ffc6d77..5825482db7 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -315,7 +315,9 @@ module ActiveRecord end def announce(message) - text = "#{@version} #{name}: #{message}" + version = defined?(@version) ? @version : nil + + text = "#{version} #{name}: #{message}" length = [0, 75 - text.length].max write "== %s %s" % [text, "=" * length] end |