DEV: Fix modifying a frozen string.

This commit is contained in:
Guo Xiang Tan 2019-05-16 11:30:31 +08:00
parent dd49be27d3
commit 227bedebf7
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ class OneboxController < ApplicationController
def show
unless params[:refresh] == 'true'
preview = Oneboxer.cached_preview(params[:url])
preview = preview.strip! if preview.present?
preview = preview.strip if preview.present?
return render(plain: preview) if preview.present?
end
@ -31,7 +31,7 @@ class OneboxController < ApplicationController
topic_id: topic_id
)
preview = preview.strip! if preview.present?
preview = preview.strip if preview.present?
Oneboxer.onebox_previewed!(user_id)