Explorar o código

order_static add if nil

abiao %!s(int64=5) %!d(string=hai) anos
pai
achega
3f09d295d7
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/models/order_static.rb

+ 2 - 2
app/models/order_static.rb

@@ -27,12 +27,12 @@ class OrderStatic < ActiveRecord::Base
 
   def begin_date_fomat
 
-    if self.begin_date !=nil?
+    if !self.begin_date.nil?
       return self.begin_date.strftime
     end
   end
   def end_date_fomat
-    if self.end_date !=nil?
+    if !self.end_date.nil?
       return self.end_date.strftime
     end
   end