Permalink
Browse files

fix year

  • Loading branch information...
1 parent e1bdff8 commit 6b6e85e914cc2205900d0560c7ede81dcdbd01e3 @salicio salicio committed Nov 1, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/support_functions.rb
View
2 lib/support_functions.rb
@@ -23,7 +23,7 @@ def self.check_demography
:codigo_ine => ine_id)
puts "Creating #{mun.nombre}"
end
- y = "20#{year}".to_i
+ y = year.to_i > 85 ? "19#{year}".to_i : "20#{year}".to_i
demos = mun.demograficas.find_by_ano(y)
unless demos
puts "Creating demographics for #{mun.nombre} [#{y}]"

0 comments on commit 6b6e85e

Please sign in to comment.