Fixes error in controller

Added respond_to in the controllers to be able to use respond_with.