Skip to content

Ignore gen 2 pokemons to keep the app working#105

Open
jrglee wants to merge 1 commit into
dphuang2:masterfrom
jrglee:master
Open

Ignore gen 2 pokemons to keep the app working#105
jrglee wants to merge 1 commit into
dphuang2:masterfrom
jrglee:master

Conversation

@jrglee

@jrglee jrglee commented Jan 6, 2017

Copy link
Copy Markdown

The app started to break as soon as I hatched eggs with gen 2 pokemons. Since I do not know if there is any work in progress regarding the extra pokemons, I did a quick fix just to keep things working as they were.

Here are some tech details

  • The expression i[:pokemon_id].capitalize in the line 75 (line 76 on my PR) returns a Fixnum instead of a string for gen 2 pokemons. This makes the app break on login.
  • A quick fix is to add a to_s and make sure capitalize works but that makes the app load an empty page. It looks like the JSON serialization crashes because there are not base stats for gen 2 pokemons in the pokemon model class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant