-
-
Save renz45/1663474 to your computer and use it in GitHub Desktop.
Rails for Zombies 2 - Challenge 3-7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here is the parameters hash sent into the controller | |
params = { zombie_id: 2, id: 1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Weapon < ActiveRecord::Base | |
belongs_to :zombie | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Zombie < ActiveRecord::Base | |
has_many :weapons | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment