Javascript helper in rails projects