several changes and added json to controllers
added gon gem to transfer variable data to js