-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
- Changing BonusReserve.game_id to be a foreign key on Game.id
…nus-credits-to-bonus-reserves
…e corresponding class name
…" (instead of automatic "bonus_reserf"...), and fixing multiple initialization problems
@@ -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" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
Related to issue 43: #43