There's no local variable in your view called `stock`, so this would fail. All of these references would need to be `@stock`, so they get the instance variable that was assigned in the controller.