Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 43/rename bonus credits to bonus reserves #83

Closed

Conversation

gsaint
Copy link
Contributor

@gsaint gsaint commented May 9, 2017

  • Renaming all occurrences of "Bonus credit" to "Bonus reserve".

Related to issue 43: #43

@@ -167,7 +168,8 @@
add_index "users", ["team_id"], name: "index_users_on_team_id", using: :btree
add_index "users", ["team_role_id"], name: "index_users_on_team_role_id", using: :btree

add_foreign_key "bonus_credits", "teams"
add_foreign_key "bonus_reserves", "games"
add_foreign_key "bonus_reserves", "teams"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added in this file some missing index (bonus_reserves.game_id) and foreign keys (game_id.games and game_id.teams).


ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular 'bonus_reserve', 'bonus_reserves'
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much fun with this one... Rails was creating routes with a wrong singularization, and was also unable to properly initialize the Game model as it was expecting "bonus_reserf" to be the singularization of "bonus_reserves"... Took me some time to understand where it came from!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:o that's crazy go nuts.

@gsaint gsaint closed this May 24, 2019
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.

2 participants