Project

General

Profile

Revision fc22c54f

Added by Daniel Lobato Garcia about 5 years ago

Remove redirect_to :back (Rails 5.1)

View differences:

app/controllers/containers_controller.rb
29 29
      if @container.present?
30 30
        process_error(:redirect => containers_path)
31 31
      else
32
        redirect_to :back
32
        redirect_back(:fallback_location => containers_path)
33 33
      end
34 34
    end
35 35
  rescue ActiveRecord::RecordNotFound
......
67 67
      redirect_to containers_path(:id => @container.id)
68 68
    else
69 69
      error _("failed to %{action} %{vm}") % { :action => _(action), :vm => @docker_container }
70
      redirect_to :back
70
      redirect_back(:fallback_location => containers_path)
71 71
    end
72 72
    # This should only rescue Fog::Errors, but Fog returns all kinds of errors...
73 73
  rescue => e
74 74
    error _("Error - %{message}") % { :message => _(e.message) }
75
    redirect_to :back
75
    redirect_back(:fallback_location => containers_path)
76 76
  end
77 77

  
78 78
  private

Also available in: Unified diff