create mood with user
This commit is contained in:
parent
7fbc41d332
commit
c3c475b989
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue