mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:39:53 +01:00
Throw error when unsmile target reaction doesn't exist
This commit is contained in:
parent
8ddfcef259
commit
93958cb9fd
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ module User::ReactionMethods
|
|||
# unsmile an answer or comment
|
||||
# @param item [ApplicationRecord] the answer/comment to unsmile
|
||||
def unsmile(item)
|
||||
Reaction.find_by(user: self, parent: item).destroy
|
||||
Reaction.find_by!(user: self, parent: item).destroy
|
||||
end
|
||||
|
||||
def smiled?(item)
|
||||
|
|
Loading…
Reference in a new issue