Skip to content

Commit

Permalink
pluralized the card types in deck show page and shorten the textarea …
Browse files Browse the repository at this point in the history
…in edit and new deck page
  • Loading branch information
rockychiang committed Apr 13, 2018
1 parent 80baf13 commit ef5c676
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/decks/edit.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<% session[:error] = nil %>
<% end %>

<textarea id="deck_list" name="deck_list" rows="25">
<textarea id="deck_list" name="deck_list" rows="20">
<% @deck.cards.each do |card| %><%= card.quantity(@deck.id) %>x <%= card.name %>&#13;<% end %>
</textarea>

Expand Down
2 changes: 1 addition & 1 deletion app/views/decks/new.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<% session[:error] = nil %>
<% end %>

<textarea id="deck_list" name="deck_list" rows="25"></textarea>
<textarea id="deck_list" name="deck_list" rows="20"></textarea>

<p class="formatting">Formatting: One card per line and specify each card's amount in the beginning of the line.<br /><br />Example:<br />1x Ezuri, Renegade Leader<br />1x Sol Ring</p>

Expand Down
2 changes: 1 addition & 1 deletion app/views/decks/show.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ul>
<% ["Creature", "Artifact Creature", "Instant", "Sorcery", "Enchantment", "Artifact", "Planeswalker", "Land"].each do |type| %>
<% if @deck.cards.where(card_type: type).count > 0 %>
<li><%= type %>:</li>
<li><%= type == "Sorcery" ? "Sorcerie" : type%>s:</li>
<% @deck.cards.where(card_type: type).each do |card| %>
<li><%= card.quantity(@deck.id) %>x <%= card.name %></li>
<% end %>
Expand Down

0 comments on commit ef5c676

Please sign in to comment.