No you're not. If you want to call the method in the view you need to
put it in a view helper (rails will have created an empty view helper
for you.
Just having it inline in the view file should work though (assuming
what you've got are actually all numbers, not strings or something
like that). At the end of the day I'd probably have this as a method
on product.