Posts tagged programming
Rails provides some nice helper functions (numbers, dates, etc.) that are available to views, but they’re not automatically available to controllers. I found a number of ways to accomplish this on the web, but I wasn’t satisfied with any of them.
I noticed a friend of mine (Jordan L.) who had half-star ratings (2.5, 3.5, etc.) on Netflix. When I asked him about it, he said to just “hover over the left side of the star” to get a half-star rating. This didn’t work for me, so I thought it might be a Linux vs. Windows thing and asked another friend (Mike F.) to try it out. Same result – didn’t work in IE or Firefox on Windows. Then Mike found a JavaScript file that could be installed with greasemonkey and that worked fine for him.