Skip to content

Commit

Permalink
Don't render the calendar if there's no guild to render from
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonroelofs committed Dec 28, 2012
1 parent 8b851b1 commit 7303934
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class HomeController < ApplicationController
def index
@raid_calendar_presenter = RaidCalendarPresenter.new(
current_guild
)
) if current_guild
end

end
4 changes: 3 additions & 1 deletion app/views/home/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<%= current_guild_chooser %>
<%= render_raid_calendar @raid_calendar_presenter %>
<% if @raid_calendar_presenter %>
<%= render_raid_calendar @raid_calendar_presenter %>
<% end %>

0 comments on commit 7303934

Please sign in to comment.