Skip to content

Commit

Permalink
Merge pull request #61 from Midburn/bug/random_not_from_public_disabled
Browse files Browse the repository at this point in the history
Random button now shows also for the dreamers dream. Random is not sh…
  • Loading branch information
sh0oki authored Jan 11, 2017
2 parents caa93fb + 0af7cfa commit 085c42e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/views/camps/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,12 @@
<br>
<% end %>

<% if !current_user || @camp.creator != current_user %>
<% random = Camp.order("RANDOM()").first %>
<a href="<%= url_for(random) %>" class="btn btn-primary camp-button" role="button">
<%=t :next_random_dream %> <span class="glyphicon glyphicon-random" aria-hidden="true"></span>
</a>
<% end %>

<% random = Camp.active(true).not_hidden(true).order("RANDOM()").first %>
<a href="<%= url_for(random) %>" class="btn btn-primary camp-button" role="button">
<%=t :next_random_dream %> <span class="glyphicon glyphicon-random" aria-hidden="true"></span>
</a>

</div>
</ul>

Expand Down

0 comments on commit 085c42e

Please sign in to comment.