Avoid exception on blank comments.
This commit is contained in:
parent
3a85d4f49f
commit
a8a243b5fa
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,7 @@ class OrderingController < ApplicationController
|
|||
order = Order.find(params[:id])
|
||||
comment = order.comments.build(params[:comment])
|
||||
comment.user = @current_user
|
||||
if !comment.text.empty? and comment.save
|
||||
if !comment.text.blank? and comment.save
|
||||
flash[:notice] = "Kommentar wurde erstellt."
|
||||
else
|
||||
flash[:error] = "Kommentar konnte nicht erstellt werden. Leerer Kommentar?"
|
||||
|
|
Loading…
Reference in a new issue