- if current_user != @diary_entry.user
- redirect_to diary_entry_path(@diary_entry.user, @diary_entry)
- elsif params[:diary_entry] && @diary_entry.update(entry_params)
+ if current_user != @diary_entry.user ||
+ (params[:diary_entry] && @diary_entry.update(entry_params))