diff --git a/app/controllers/rfid_tags_controller.rb b/app/controllers/rfid_tags_controller.rb index bdc9130..977ef15 100644 --- a/app/controllers/rfid_tags_controller.rb +++ b/app/controllers/rfid_tags_controller.rb @@ -23,7 +23,7 @@ class RfidTagsController < ApplicationController def create_mood(rfid_tag) if rfid_tag.mode - Mood.create!(recorded_at: DateTime.now, mode: rfid_tag.mode) + Mood.create!(recorded_at: DateTime.now, mode: rfid_tag.mode, user: rfid_tag.user) head :created, code: :recorded else head :unprocessable_entity