Skip to content

Instantly share code, notes, and snippets.

@codeschool-courses
Created August 31, 2011 17:36
Show Gist options
  • Save codeschool-courses/1184145 to your computer and use it in GitHub Desktop.
Save codeschool-courses/1184145 to your computer and use it in GitHub Desktop.
Rails for Zombies 2 - Challenge 3-7
# Here is the parameters hash sent into the controller
params = { zombie_id: 2, id: 1 }
class Weapon < ActiveRecord::Base
belongs_to :zombie
end
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