title: Object says it is nil when in fact it is not.
body: <p>this is a very weird thing and probably there is an easy solution but I have no idea whats going on. </p>
  
  <p>This is my method:</p>
  
  <pre><code>    def to_event_format
         event = {title: self.client.nombre_completo, start: self.fecha, end: self.fecha.one_hour}
         event
      end
  </code></pre>
  
  <p>The problem is</p>
  
  <pre><code>NoMethodError (undefined method `one_hour' for nil:NilClass):
  </code></pre>
  
  <p>The problem is with the self.fecha <strong>.one_hour</strong></p>
  
  <p>But its not the method what is wrong. I get the same error for methods like .sunday? and other default Time methods. </p>
  
  <pre><code>NoMethodError (undefined method `sunday?' for nil:NilClass):
  </code></pre>
  
  <p>It gets weirder in the debugger, where the method actually works.</p>
  
  <pre><code>(byebug) self.fecha
  -&gt; Thu, 30 Oct 2014 19:00:00 UTC +00:00
  (byebug) self.fecha.one_hour
  -&gt; Thu, 30 Oct 2014 20:00:00 UTC +00:00
  </code></pre>
  
  <p>How can the method work in the debugger but not in the app? And why is it nil when I call a method on it, but works fine when left alone? </p>
  
  <p>I don't understand anything. </p>