Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Friendly message if models not set

  • Loading branch information...
commit 52cb643f743d298759e0e7b95f8a9c4efdec64b9 1 parent 19049cb
@dce dce authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 app/views/stat_board/stats/index.html.erb
View
7 app/views/stat_board/stats/index.html.erb
@@ -1,4 +1,4 @@
-<div>
+<% if StatBoard.models %>
<%= render "chart",
:title => "Overall",
:scope => lambda { |klass| klass } %>
@@ -10,4 +10,7 @@
<%= render "chart",
:title => "This Week",
:scope => lambda { |klass| klass.where(["created_at > ?", 1.week.ago]) } %>
-</div>
+<% else %>
+ Please specify some models by setting <code>StatBoard.models</code>
+ (in <code>config/initializers/stat_board.rb</code>, for example).
+<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.