CHTJonas/roombooking

Error viewing rooms in limited circumstances

Closed this issue · 0 comments

The RoomsController#Index method contains an if/elsif block used to set the @rooms instance variable:

if request.format == :html
  # blah
elsif request.format == :ics
  # blah
end

It seems that in certain circumstances request.format is equal to neither :html nor :ics. In these situation, @rooms is equal to nil and so rendering the app/views/rooms/index.html.erb template fails at line 8:

<% @rooms.each do |room| %>

Sentry issue: ROOMBOOKING-M