mirror of
https://github.com/discourse/discourse.git
synced 2025-03-24 20:35:33 +08:00
Fix modifying frozen strings error in OneboxController
.
This commit is contained in:
parent
b584e30902
commit
74989783da
@ -8,7 +8,7 @@ class OneboxController < ApplicationController
|
||||
def show
|
||||
unless params[:refresh] == 'true'
|
||||
preview = Oneboxer.cached_preview(params[:url])
|
||||
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.strip! if preview.present?
|
||||
preview = preview.strip! if preview.present?
|
||||
|
||||
Oneboxer.onebox_previewed!(user_id)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user