RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: markbates
Just a heads up, you don't need to do this:
@Product = Product
For the Product class to be globally available. You can combine that into the actual definition of the class, like such: