Skip to content

Commit 90eeb56

Browse files
committed
Properly raise RecordNotFound if the message was not found
1 parent 1e7417c commit 90eeb56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/messages_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def index(list_name: nil, q: nil, page: nil)
2323
# GET /ruby-dev/1
2424
def show(list_name:, list_seq:)
2525
@list = List.find_by_name(list_name)
26-
@message = Message.find_by(list_id: @list, list_seq: list_seq)
26+
@message = Message.find_by!(list_id: @list, list_seq: list_seq)
2727
end
2828

2929
private

0 commit comments

Comments
 (0)