Add gem and refactor controller to include error messages
Render error messages if any