Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

undefined method `in_time_zone' for nil:NilClass for sensor 2, but not for sensor 1 #36

Open
rhelfter opened this issue Jul 20, 2010 · 0 comments

Comments

@rhelfter
Copy link

Processing PagesController#events_for_sensor (for ::ffff:192.168.5.136 at 2010-07-20 16:44:13) [GET]
Parameters: {"sensor"=>"2", "controller"=>"pages", "action"=>"events_for_sensor"}
Rendering template within layouts/application
Rendering pages/events_for_sensor

ActionView::TemplateError (undefined method `in_time_zone' for nil:NilClass) on line #5 of app/views/events/_event.html.erb:
2:


3:
4:

5: <%= time_ago_in_words(Chronic.parse(event.timestamp.in_time_zone('UTC'))) %> ago - <%= event.timestamp.getutc.strftime('%D - %I:%M:%S %p') %>

6:

7:
8:

app/views/events/_event.html.erb:5
app/views/pages/events_for_sensor.html.erb:4
<internal:prelude>:8:in `synchronize'
/apps/IPsoft/ruby191/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/apps/IPsoft/ruby191/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/apps/IPsoft/ruby191/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

Rendering template within layouts/application
Rendering /errors/500.html.erb (500 Internal Server Error)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant