In all other methods it works fine with format.html, but in this one with format.js it updates the view but the visible url remains the same
respond_to do |format|
format.html { redirect_to some_path }
format.js { redirect_to(:action => :index, :format => :js, :date => day}
end
if I change the date the view won’t refresh either:
format.js { redirect_to(:action => :index, :format => :js, :date => params[:date])}
If i comment out format.html everything works the same way.
Do I need to update_attributes or somehow refresh the hidden_value?
Or add another redirect?
What could I be doing wrong?
format.js should return js code, so in this case, you will have to change to this