We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a94af40 commit 50148c9Copy full SHA for 50148c9
app/controllers/scripts_controller.rb
@@ -481,14 +481,10 @@ def do_delete
481
# Handle replaced by
482
replaced_by = get_script_from_input(params[:replaced_by_script_id])
483
case replaced_by
484
- when :non_gf_url
+ when :non_gf_url, :non_script_url
485
@script.errors.add(:replaced_by_script_id, I18n.t('errors.messages.must_be_greasy_fork_script', site_name:))
486
render :delete
487
return
488
- when :non_script_url
489
- @script.errors.add(:replaced_by_script_id, :must_be_greasy_fork_script)
490
- render :delete
491
- return
492
when :not_found
493
@script.errors.add(:replaced_by_script_id, :not_found)
494
0 commit comments