Set up conditions in the update and create actions in app/controllers/project_controller.rb