Spent too long with this.

This commit is contained in:
Jez Caudle 2024-12-04 17:55:36 +00:00
parent 7f2275c40e
commit d8074f4b62
3 changed files with 8 additions and 3 deletions

View File

@ -8,8 +8,12 @@ class SubprincipleitemsController < ApplicationController
def update
respond_to do |format|
if @subprincipleitem.update(subprincipleitem_params)
format.html { redirect_to (company_caf_path(@caf.company, @caf) + "#subprincipleitem_#{@subprincipleitem.id}"), notice: "CAF item was updated." }
format.json { render :show, status: :ok, location: @company }
#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 }
else
format.html { render :edit, status: :unprocessable_entity }
format.json { render json: @company.errors, status: :unprocessable_entity }

View File

@ -0,0 +1 @@
Bollox

View File

@ -14,6 +14,6 @@ class CafTest < ActiveSupport::TestCase
end
test "yaml file is valid" do
ymal = YAML.load_file('config/caf_text.yml')
ymal = YAML.load_file('config/caf_text.yml ')
end
end