Created
November 29, 2016 16:17
-
-
Save Random-Stack-Random-Day/af849870ba3edb216bfdd8086d71ffcb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% provide(:title, @user.name) %> | |
<div class="row"> | |
<aside class="col-md-4"> | |
<section class="user_info"> | |
<h1> | |
<%= gravatar_for @user %> | |
<%= @user.name %><br> | |
</h1> | |
</section> | |
</aside> | |
<div class="collectionList"> | |
<% @user.collections.each do |d| %> | |
<div class="collectionSample"> | |
<strong><%= link_to d.name, {:controller => "collections", :action => "show", :id => d.id } %></strong><br /> | |
Distinct Cards: <%= d.card_collections.count %> <br /> | |
Total Cards: | |
<% d.card_collections.each do |x| %> | |
<% y = [] %> | |
<% y << x.card_counts %> | |
<% y.flatten! %> | |
<% y = y.inject(0){|sum,x| sum + x } %> | |
<%= y %> | |
<% end %> | |
<% if d.public %> Public <% end %><br /> | |
</div> | |
<% end %> | |
</div> | |
</div> |
aruprakshit
commented
Nov 29, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment