Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

views/events/show spec fails when it tries to call User.current_user.calendars

#11

ActionView::TemplateError in '/events/show should wrap the whole thing in a

of class events' You have a nil object when you didn't expect it! The error occurred while evaluating nil.calendars On line #9 Write developer documentationof events/_table_header.html.haml
6:     = sortlinks ? sort_link("Date", :date, (@order == 'date' and @direction == 'asc') ? :desc : :asc) : h(_("Date"))
7:     - if @order == 'date'
8:       &= @direction == 'asc' ? '↑' : '↓'
9:   - if User.current_user.calendars.size > 1
10:     %th.calendar&= _('Calendar')
11:   %th
12:     = sortlinks ? sort_link("Event", :name, (@order == 'name' and @direction == 'asc') ? :desc : :asc) : h(_("Event"))

app/views/events/_table_header.html.haml:9:in `_run_plugin_47app47views47events47_table_header46html46haml'
vendor/gems/haml-2.1.0/lib/haml/helpers/action_view_mods.rb:12:in `orig_render'
vendor/gems/haml-2.1.0/lib/haml/helpers.rb:57:in `non_haml'
vendor/gems/haml-2.1.0/lib/haml/helpers/action_view_mods.rb:12:in `orig_render'
app/views/events/show.html.haml:4:in `_run_plugin_47app47views47events47show46html46haml'
/Library/Ruby/Gems/1.8/gems/gettext-1.93.0/lib/gettext/rails.rb:289:in `render_file'
spec/views/events/show.html.haml_spec.rb:18

Reported by Marnen Laibow-Koser · December 11th, 2008 @ 01:20 PM

State: resolved
Milestone: none
Assigned to: Marnen Laibow-Koser Marnen Laibow-Koser

Activity

  1. Marnen Laibow-Koser
    Marnen Laibow-Koser
    • State changed from new to resolved

    (from [790b1c1feb91c0247459cc7136e8f0ef9e06d2bd]) Mock User.current_user so it won't choke when methods are called on it. [#11 views/events/show spec fails when it tries to call User.current_user.calendars state:resolved] http://github.com/marnen/quorum2...

    December 11th, 2008 @ 01:23 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.