Fixed with JavaScript. Should have done this first.
This commit is contained in:
parent
d8074f4b62
commit
0838c0db33
@ -6,14 +6,15 @@ class SubprincipleitemsController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
@redirect_path = helpers.raw("#{company_caf_path(@caf.company, @caf)}##{helpers.dom_id(@subprincipleitem)}")
|
||||
respond_to do |format|
|
||||
if @subprincipleitem.update(subprincipleitem_params)
|
||||
#redirect_path = helpers.raw("#{company_caf_path(@caf.company, @caf)}/bollox")
|
||||
|
||||
#format.html { redirect_to company_caf_path(@caf.company, @caf) , html_options: { target: helpers.dom_id(@subprincipleitem) } , notice: "html" }
|
||||
##{company_caf_path(@caf.company, @caf)}#subprincipleitem_#{@subprincipleitem.id} #{helpers.dom_id(@subprincipleitem)}
|
||||
|
||||
#format.json { render :show, status: :ok, location: @company }
|
||||
format.html { render :update }
|
||||
format.html { render :update, status: :temporary_redirect}
|
||||
else
|
||||
format.html { render :edit, status: :unprocessable_entity }
|
||||
format.json { render json: @company.errors, status: :unprocessable_entity }
|
||||
|
||||
@ -1 +1,3 @@
|
||||
Bollox
|
||||
<script>
|
||||
window.location.href= "<%=@redirect_path%>";
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user