Permalink
Browse files

ajustamos vigencia en verificacion_current_vigency en lugar de _str

  • Loading branch information...
manuel-rabade committed Aug 31, 2014
1 parent 34e0330 commit b265f0fc001027ec094fdc2e5b3ab20cd80b8502
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/vehicle_cdmx.rb
View
@@ -269,7 +269,11 @@ def verificacion_current?
def verificacion_current_vigency
return false unless self.verificacion_current?
Date.parse(self.verificacion_current['vigencia'])
if self.verificacion_current['equipo_gdf'] == '1'
Date.parse(self.verificacion_current['vigencia'])
else
Date.parse(self.verificacion_current['vigencia']) - 1
end
end
def verificacion_current_period
@@ -334,11 +338,7 @@ def verificacion_first_expired?
def verificacion_current_expired_str
return false unless self.verificacion_current?
if self.verificacion_current['equipo_gdf'] == '1'
I18n.localize(self.verificacion_current_vigency, :format => :long)
else
I18n.localize(self.verificacion_current_vigency - 1, :format => :long)
end
I18n.localize(self.verificacion_current_vigency, :format => :long)
end
def verificacion_current_vigency_str

0 comments on commit b265f0f

Please sign in to comment.