Allow edit a device through view

Add edit and update controller method and edit view for devices.