got rid of ternary operator
removed rails helper to fix groupon bug