Redirect to a back_url when deleting a rate also. #1919
This commit is contained in:
@@ -108,7 +108,13 @@ class RatesController < ApplicationController
|
||||
@rate.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to(rates_url(:user_id => @rate.user_id)) }
|
||||
format.html {
|
||||
if params[:back_url] && !params[:back_url].blank?
|
||||
redirect_to(params[:back_url])
|
||||
else
|
||||
redirect_to(rates_url(:user_id => @rate.user_id))
|
||||
end
|
||||
}
|
||||
format.xml { head :ok }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user