updated for asset pipeline difference between rails 3.1.2 and 4.1.5