Subprincples now have a default of false in the affirmative column.
We do now need to be able to flip that to :true and add the evidence.
This commit is contained in:
@@ -39,7 +39,7 @@ class CafsController < ApplicationController
|
||||
def update
|
||||
respond_to do |format|
|
||||
if @caf.update(caf_params)
|
||||
format.html { redirect_to caf_url(@caf), notice: "Caf was successfully updated." }
|
||||
format.html { redirect_to company_caf_url(@company, @caf), notice: "Caf was successfully updated." }
|
||||
format.json { render :show, status: :ok, location: @caf }
|
||||
else
|
||||
format.html { render :edit, status: :unprocessable_entity }
|
||||
@@ -53,7 +53,7 @@ class CafsController < ApplicationController
|
||||
@caf.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to cafs_url, notice: "Caf was successfully destroyed." }
|
||||
format.html { redirect_to authenticated_root_url, notice: "Caf was successfully destroyed." }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h1>Editing caf</h1>
|
||||
|
||||
<%= render "form", caf: @caf %>
|
||||
<h1><%= @company.name%></h1>
|
||||
<h2>Editing CAF: <%= @caf.name%></h2>
|
||||
<%= render partial: "form", locals: { company: @company, caf: @caf } %>
|
||||
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<%= link_to "Show this caf", @caf %> |
|
||||
<%= link_to "Back to cafs", cafs_path %>
|
||||
<%= link_to "Show this CAF", company_caf_path(@company, @caf) %> |
|
||||
<%# = link_to "Back to cafs", authenticated_root_path %>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h1>Cafs</h1>
|
||||
|
||||
<div id="cafs">
|
||||
<% @cafs.each do |caf| %>
|
||||
<% @company.cafs.each do |caf| %>
|
||||
<%= render caf %>
|
||||
<p>
|
||||
<%= link_to "Show this caf", caf %>
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<%= link_to "Back to cafs", company_cafs_path(@company) %>
|
||||
<%= link_to "Back to CAF", company_cafs_path(@company) %>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div>
|
||||
<%= link_to "Edit this caf", edit_company_caf_path(@caf.company_id,@caf.id) %> |
|
||||
<%= link_to "Back to cafs", company_cafs_path(@caf.company_id) %>
|
||||
<%= link_to "Back to cafs", authenticated_root_path %>
|
||||
|
||||
<%= button_to "Destroy this caf", company_caf_path(@caf.id), method: :delete %>
|
||||
<%= button_to "Destroy this caf", company_caf_path(@company.id, @caf.id), method: :delete %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user