Skip to content

Instantly share code, notes, and snippets.

@renz45
Forked from codeschool-courses/params.rb
Created January 23, 2012 14:46
Show Gist options
  • Save renz45/1663474 to your computer and use it in GitHub Desktop.
Save renz45/1663474 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