diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-03 16:13:45 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-03 16:13:45 -0700 |
commit | 8beda11fd3cbd2db21a7a7a7ae9823edbbc2dd5e (patch) | |
tree | ac770f6f6e181a8509c1352114d1acdbea0864ee /activerecord | |
parent | a6c42c82678f11271fe71923a200eb135f2f1c0e (diff) | |
download | rails-8beda11fd3cbd2db21a7a7a7ae9823edbbc2dd5e.tar.gz rails-8beda11fd3cbd2db21a7a7a7ae9823edbbc2dd5e.tar.bz2 rails-8beda11fd3cbd2db21a7a7a7ae9823edbbc2dd5e.zip |
no need to differentiate between nil and false in this case
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index e708b3fbcf..b075632de6 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -570,7 +570,7 @@ module ActiveRecord current = migrations.detect { |m| m.version == current_version } target = migrations.detect { |m| m.version == @target_version } - if target.nil? && !@target_version.nil? && @target_version > 0 + if target.nil? && @target_version && @target_version > 0 raise UnknownMigrationVersionError.new(@target_version) end @@ -579,7 +579,7 @@ module ActiveRecord runnable = migrations[start..finish] # skip the last migration if we're headed down, but not ALL the way down - runnable.pop if down? && !target.nil? + runnable.pop if down? && target runnable.each do |migration| Base.logger.info "Migrating to #{migration.name} (#{migration.version})" if Base.logger |