Pokédex
<%= form_with url: pokedex_path do |f| %>
<%= f.collection_select :user_id, User.order(:name), :id,
->(user) { user.name || "No. #{user.id}" }, {selected: params[:user_id], include_blank: "Show full Pokédex"}
%>
<% end %>
<% if @user %>
has captured <%= pluralize(@user.captured_pokemon.count, "specie") %> of pokémon.
<% end %>
<% Pokemon.order(:pokedex_num).each do |pokemon| %>
<% break if pokemon.pokedex_num.to_i > 386 # Up through gen 3. %>
No. <%= pokemon.pokedex_num %>
<%= image_tag pokemon.sprite_path %>
<%= pokemon.name %>
<% end %>