Update logic extracted to application controller
Merge ../x0y0

Conflicts:
	app/controllers/application_controller.rb
	test/controllers/application_controller_test.rb
Use the new update_resource method