class RatesController < ApplicationController
  def create
    value = Integer(params[:value])
    submission_id = Integer(params[:submission_id])
    user_id = current_user.id

    rate_creator = RateCreator.build(value, submission_id, user_id)
    result = rate_creator.call
    if !result.success
      flash[:error] = result.errors
      redirect_to :back
    else
      redirect_to :back, notice: 'Rate was successfully created.'
    end
  end
end

class RatesController < ApplicationController
  def create
    value = Integer(params[:value])
    submission_id = Integer(params[:submission_id])
    user_id = current_user.id

    rate_creator = RateCreator.build(value, submission_id, user_id)
    result = rate_creator.call
    if !result.success
      flash[:error] = result.errors
      redirect_to submission_path(submission_id)
    else
      redirect_to submission_path(submission_id), notice: 'Rate was successfully created.'
    end
  end
end

Correct redirect to in rates controller to fix bug
Correct redirect to in rates controller to fix bug
