match was depreciated in rails4. Using get and post where approriate