Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Rails不通过接受\u嵌套的\u属性\u保存图像_Ruby On Rails_Ruby On Rails 6_Accepts Nested Attributes - Fatal编程技术网

Ruby on rails Rails不通过接受\u嵌套的\u属性\u保存图像

Ruby on rails Rails不通过接受\u嵌套的\u属性\u保存图像,ruby-on-rails,ruby-on-rails-6,accepts-nested-attributes,Ruby On Rails,Ruby On Rails 6,Accepts Nested Attributes,我正在尝试使用accepts\u嵌套的\u属性通过ActiveStorage保存图像。当我编辑子记录时,它工作得很好,但是当我将它放在表单中时,看起来一切都正常,但它不是实际保存。下面是我目前使用的代码: 控制器: strong_params = params.require(:inspection).permit( :name, :description, :schedule, :department_id, :a

我正在尝试使用accepts\u嵌套的\u属性通过ActiveStorage保存图像。当我编辑子记录时,它工作得很好,但是当我将它放在表单中时,看起来一切都正常,但它不是实际保存。下面是我目前使用的代码:

控制器:

strong_params = params.require(:inspection).permit(
        :name,
        :description,
        :schedule,
        :department_id,
        :active,
        :start_time,
        :recurring,
        :inspectionpoints_attributes => [ :id, :name, :description, :active, :question_type, :_destroy ],)
模型

形式呢

<%= form_with(model: inspectionactual, url: (inspectionactual.persisted? ? [:account, inspectionactual] : [:account, @inspection, :inspectionactuals]), local: true, :html => { :multipart => true }) do |form| %>
  <%= render 'shared/forms/errors', form: form %>


  <%= render 'shared/fields/date_and_time_field', form: form, method: :date, options: {autofocus: true} %>
   <%= form.hidden_field :user_id, :value => current_user.id %> 
  <%= render 'shared/fields/text_field', form: form, method: :name %>
  <%= render 'shared/fields/text_area', form: form, method: :description %>

    
   <h5>Indiviudal Points</h5>
 <%= form.fields_for :inspectionpointactuals do |point| %>
 <div class="element-box">
  <% if point.object.question_type == "boolean" %>
       <%= form.label point.object.name %><br/>
       <div>
      <label class="btn-toggle"> 
      <%= point.radio_button :response, "True", class: "btn" %><button type="button" class="btn">
            Yes
          </button>
    </label>
 
    <label class="btn-toggle"> 
      <%= point.radio_button :response, "False", class: "btn" %><button type="button" class="btn">
            No
          </button>
    </label>
     <label class="btn-toggle"> 
      <%= point.radio_button :response, "Not Inspected", class: "btn" %><button type="button" class="btn">
            Not Inspected
          </button>
    </label>
  </div>
<br/>
  <% elsif  point.object.question_type == "integer" %>
      <%= form.label point.object.name %>
      <%= point.number_field :response, class: "form-control" %>

  <% elsif point.object.question_type == "image"%>
      <%= form.label point.object.name %>
       <div class="fileUpload btn btn-primary">
        <!-- Image upload not working as has nested yet -->
        <%= point.file_field :image, class: "form-control" %> Upload
       </div>
  <%= point.file_field :image, class: "upload" %> Upload
  <% else %>
      <%= form.label point.object.name  %>
      <%= point.text_field :response, class: "form-control" %>
  <% end %>  
  </div> 
<% end %>



  <div class="form-buttons-w">
    <%= form.submit (form.object.persisted? ? t('.buttons.update') : t('.buttons.create')), class: "btn btn-primary" %>
    <% if form.object.persisted? %>
    <%= link_to t('global.buttons.cancel'), [:account, inspectionactual], class: "btn btn-link" %>
    <% else %>
    <%= link_to t('global.buttons.cancel'), [:account, @inspection, :inspectionactuals], class: "btn btn-link" %>
    <% end %>
  </div>

<% end %>
{:multipart=>true})do | form |%>
当前用户id%>
个别点

对 不 未检查
上传 上传
我最近在表单中添加了“,:html=>{:multipart=>true}”,这是一个类似的StackOverflow中推荐的,但这并没有起作用。我的控制台数据看起来像是在工作,在我修复控制器之前,我得到的是被拒绝的保存,但它现在看起来是:映像

Processing by Account::InspectionactualsController#update as HTML
  Parameters: {"authenticity_token"=>"g48sA3QkBqOrNmz4kCaIgIndv3EHqnMHkdnM7X+v5Qc8s4o5BpH+DHSscjkl+Xb8qBVH9hPsabRxzvdKMQK0rw==", "inspectionactual"=>{"date"=>"06/25/2020", "user_id"=>"1", "name"=>"now", "description"=>"testin image", "inspectionpointactuals_attributes"=>{"0"=>{"image"=>#<ActionDispatch::Http::UploadedFile:0x00007f8a21da8718 @tempfile=#<Tempfile:/var/folders/_3/rc02kyfx3hv9ct02ymhb33rc0000gn/T/RackMultipart20200623-35070-1g0wg9g.png>, @original_filename="Screen Shot 2020-06-18 at 11.28.48 AM.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"inspectionactual[inspectionpointactuals_attributes][0][image]\"; filename=\"Screen Shot 2020-06-18 at 11.28.48 AM.png\"\r\nContent-Type: image/png\r\n">, "id"=>"14"}}}, "commit"=>"Update Inspectionactual", "id"=>"6"}
按帐户处理::InspectionActualController#更新为HTML
参数:{“真实性令牌”=>“g48sA3QkBqOrNmz4kCaIgIndv3EHqnMHkdnM7X+v5Qc8s4o5BpH+DHSscjkl+XB8QBVH9HPSABRXZVTKMK0RW==”,“检查实际”=>{“日期”=>“06/25/2020”,“用户id”=>“1”,“名称”=>“现在”,“描述”=>“测试图像”,“检查点实际属性”=>{“0”=>“图像”=>,“id”=“更新”=>,“检查id”}
任何帮助都将不胜感激,我觉得我只是错过了一些简单的东西

根据开发日志的要求。第一个是嵌套了has_但不起作用的。第二个是有效的

Rendered /Users/evanliewer/.rvm/gems/ruby-2.6.4/gems/xray-rails-0.3.2/app/views/_xray_bar.html.erb (Duration: 8.0ms | Allocations: 7416)
Unsubscribing from channel: {"channel":"Sprinkles::CollectionsChannel","collection_name":"inspectionpointactuals"}
Started PATCH "/account/inspectionactuals/6" for ::1 at 2020-06-26 16:50:17 -0700
Processing by Account::InspectionactualsController#update as HTML
  Parameters: {"authenticity_token"=>"bJVUGe87RQDpfolpTGTOK0JfDGBSKldUx8KnxHlHl+DvUzvZgcl+rr0UgCjPFVBqUYx6mF680gBCYimG8sS/4w==", "inspectionactual"=>{"date"=>"06/25/2020", "user_id"=>"1", "name"=>"now", "description"=>"testin image", "inspectionpointactuals_attributes"=>{"0"=>{"response"=>"", "id"=>"16"}, "1"=>{"id"=>"15"}, "2"=>{"image"=>#<ActionDispatch::Http::UploadedFile:0x00007f8a2c20aa68 @tempfile=#<Tempfile:/var/folders/_3/rc02kyfx3hv9ct02ymhb33rc0000gn/T/RackMultipart20200626-35070-5fr3au.png>, @original_filename="dinner.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"inspectionactual[inspectionpointactuals_attributes][2][image]\"; filename=\"dinner.png\"\r\nContent-Type: image/png\r\n">, "id"=>"14"}}}, "commit"=>"Update Inspectionactual", "id"=>"6"}
  [1m[36mUser Load (0.3ms)[0m  [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
  [1m[36mInspectionactual Load (0.3ms)[0m  [1m[34mSELECT "inspectionactuals".* FROM "inspectionactuals" WHERE "inspectionactuals"."id" = $1 LIMIT $2[0m  [["id", 6], ["LIMIT", 1]]
  [1m[36mInspection Load (0.3ms)[0m  [1m[34mSELECT "inspections".* FROM "inspections" WHERE "inspections"."id" = $1 LIMIT $2[0m  [["id", 4], ["LIMIT", 1]]
  [1m[36mTeam Load (0.2ms)[0m  [1m[34mSELECT "teams".* FROM "teams" WHERE "teams"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
  ↳ app/controllers/account/application_controller.rb:46:in `load_team'
  [1m[36mUser Update (0.8ms)[0m  [1m[33mUPDATE "users" SET "current_team_id" = $1 WHERE "users"."id" = $2[0m  [["current_team_id", 1], ["id", 1]]
  ↳ app/controllers/account/application_controller.rb:56:in `load_team'
  [1m[35m (0.2ms)[0m  [1m[35mBEGIN[0m
  ↳ app/controllers/account/inspectionactuals_controller.rb:44:in `block in update'
  [1m[36mInspectionpointactual Load (0.5ms)[0m  [1m[34mSELECT "inspectionpointactuals".* FROM "inspectionpointactuals" WHERE "inspectionpointactuals"."inspectionactual_id" = $1 AND "inspectionpointactuals"."id" IN ($2, $3, $4)[0m  [["inspectionactual_id", 6], ["id", 16], ["id", 15], ["id", 14]]
  ↳ app/controllers/account/inspectionactuals_controller.rb:44:in `block in update'
  [1m[36mUser Load (0.3ms)[0m  [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
  ↳ app/controllers/account/inspectionactuals_controller.rb:44:in `block in update'
  [1m[36mInspectionactual Load (0.2ms)[0m  [1m[34mSELECT "inspectionactuals".* FROM "inspectionactuals" WHERE "inspectionactuals"."id" = $1 LIMIT $2[0m  [["id", 6], ["LIMIT", 1]]
  ↳ app/controllers/account/inspectionactuals_controller.rb:44:in `block in update'
  [1m[36mWebhooks::Outgoing::EventType Load (0.2ms)[0m  [1m[34mSELECT "webhooks_outgoing_event_types".* FROM "webhooks_outgoing_event_types" WHERE "webhooks_outgoing_event_types"."name" = $1 LIMIT $2[0m  [["name", "inspectionactual.updated"], ["LIMIT", 1]]
  ↳ app/models/concerns/webhooks/outgoing/issuing_model.rb:22:in `generate_webhook'
  [1m[36mInspectionpointactual Update (0.4ms)[0m  [1m[33mUPDATE "inspectionpointactuals" SET "response" = $1, "updated_at" = $2 WHERE "inspectionpointactuals"."id" = $3[0m  [["response", ""], ["updated_at", "2020-06-26 23:50:17.600405"], ["id", 16]]
  ↳ app/controllers/account/inspectionactuals_controller.rb:44:in `block in update'
  [1m[36mWebhooks::Outgoing::EventType Load (0.2ms)[0m  [1m[34mSELECT "webhooks_outgoing_event_types".* FROM "webhooks_outgoing_event_types" WHERE "webhooks_outgoing_event_types"."name" = $1 LIMIT $2[0m  [["name", "inspectionpointactual.updated"], ["LIMIT", 1]]
  ↳ app/models/concerns/webhooks/outgoing/issuing_model.rb:22:in `generate_webhook'
  [1m[36mInspectionpoint Load (0.3ms)[0m  [1m[34mSELECT "inspectionpoints".* FROM "inspectionpoints" WHERE "inspectionpoints"."inspection_id" = $1[0m  [["inspection_id", 4]]
  ↳ app/models/inspectionactual.rb:33:in `create_inpectionpoints'
  [1m[36mInspectionpointactual Load (0.3ms)[0m  [1m[34mSELECT "inspectionpointactuals".* FROM "inspectionpointactuals" WHERE "inspectionpointactuals"."inspectionactual_id" = $1 AND "inspectionpointactuals"."name" = $2 AND "inspectionpointactuals"."description" = $3 AND "inspectionpointactuals"."question_type" = $4 AND "inspectionpointactuals"."sort_order" = $5 LIMIT $6[0m  [["inspectionactual_id", 6], ["name", "Third time"], ["description", "more over boo"], ["question_type", "boolean"], ["sort_order", 2], ["LIMIT", 1]]
  ↳ app/models/inspectionactual.rb:34:in `block in create_inpectionpoints'
  [1m[36mInspectionpointactual Load (0.4ms)[0m  [1m[34mSELECT "inspectionpointactuals".* FROM "inspectionpointactuals" WHERE "inspectionpointactuals"."inspectionactual_id" = $1 AND "inspectionpointactuals"."name" = $2 AND "inspectionpointactuals"."description" = $3 AND "inspectionpointactuals"."question_type" = $4 AND "inspectionpointactuals"."sort_order" = $5 LIMIT $6[0m  [["inspectionactual_id", 6], ["name", "image"], ["description", "image"], ["question_type", "image"], ["sort_order", 0], ["LIMIT", 1]]
  ↳ app/models/inspectionactual.rb:34:in `block in create_inpectionpoints'
  [1m[36mInspectionpointactual Load (0.3ms)[0m  [1m[34mSELECT "inspectionpointactuals".* FROM "inspectionpointactuals" WHERE "inspectionpointactuals"."inspectionactual_id" = $1 AND "inspectionpointactuals"."name" = $2 AND "inspectionpointactuals"."description" = $3 AND "inspectionpointactuals"."question_type" = $4 AND "inspectionpointactuals"."sort_order" = $5 LIMIT $6[0m  [["inspectionactual_id", 6], ["name", "Second"], ["description", "this num"], ["question_type", "integer"], ["sort_order", 1], ["LIMIT", 1]]
  ↳ app/models/inspectionactual.rb:34:in `block in create_inpectionpoints'
  [1m[35m (0.5ms)[0m  [1m[35mCOMMIT[0m
  ↳ app/controllers/account/inspectionactuals_controller.rb:44:in `block in update'
Redirected to http://localhost:3000/account/inspectionactuals/6
Completed 302 Found in 30ms (ActiveRecord: 5.7ms | Allocations: 20442)
Rendered /Users/evanliewer/.rvm/gems/ruby-2.6.4/gems/xray-rails-0.3.2/app/views/_xray_bar.html.erb (Duration: 7.1ms | Allocations: 7416)
Unsubscribing from channel: {"channel":"Sprinkles::CollectionsChannel","collection_name":"inspectionpointactuals"}
Started PATCH "/account/inspectionpointactuals/14" for ::1 at 2020-06-26 16:51:19 -0700
Processing by Account::InspectionpointactualsController#update as HTML
  Parameters: {"authenticity_token"=>"vfob+2B1WXl7WJMcaHcpRyfYNjlwBhPaiHOxz1y1GkGDR38xPYxsFyBSPC4LDcOsgNKM3Y1+ZvnQrI4sRySgpw==", "inspectionpointactual"=>{"name"=>"image", "description"=>"image", "response"=>"", "image"=>#<ActionDispatch::Http::UploadedFile:0x00007f8a2c131ec0 @tempfile=#<Tempfile:/var/folders/_3/rc02kyfx3hv9ct02ymhb33rc0000gn/T/RackMultipart20200626-35070-1c5i4ng.png>, @original_filename="lunch.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"inspectionpointactual[image]\"; filename=\"lunch.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Update Inspectionpointactual", "id"=>"14"}
  [1m[36mUser Load (0.4ms)[0m  [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
  [1m[36mInspectionpointactual Load (0.4ms)[0m  [1m[34mSELECT "inspectionpointactuals".* FROM "inspectionpointactuals" WHERE "inspectionpointactuals"."id" = $1 LIMIT $2[0m  [["id", 14], ["LIMIT", 1]]
  [1m[36mInspectionactual Load (0.3ms)[0m  [1m[34mSELECT "inspectionactuals".* FROM "inspectionactuals" WHERE "inspectionactuals"."id" = $1 LIMIT $2[0m  [["id", 6], ["LIMIT", 1]]
  [1m[36mInspection Load (0.2ms)[0m  [1m[34mSELECT "inspections".* FROM "inspections" WHERE "inspections"."id" = $1 LIMIT $2[0m  [["id", 4], ["LIMIT", 1]]
  [1m[36mTeam Load (0.4ms)[0m  [1m[34mSELECT "teams".* FROM "teams" WHERE "teams"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
  ↳ app/controllers/account/application_controller.rb:46:in `load_team'
  [1m[36mUser Update (0.9ms)[0m  [1m[33mUPDATE "users" SET "current_team_id" = $1 WHERE "users"."id" = $2[0m  [["current_team_id", 1], ["id", 1]]
  ↳ app/controllers/account/application_controller.rb:56:in `load_team'
  [1m[35m (0.2ms)[0m  [1m[35mBEGIN[0m
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mInspectionpointactual Update (0.4ms)[0m  [1m[33mUPDATE "inspectionpointactuals" SET "response" = $1, "updated_at" = $2 WHERE "inspectionpointactuals"."id" = $3[0m  [["response", ""], ["updated_at", "2020-06-26 23:51:19.219950"], ["id", 14]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mWebhooks::Outgoing::EventType Load (0.2ms)[0m  [1m[34mSELECT "webhooks_outgoing_event_types".* FROM "webhooks_outgoing_event_types" WHERE "webhooks_outgoing_event_types"."name" = $1 LIMIT $2[0m  [["name", "inspectionpointactual.updated"], ["LIMIT", 1]]
  ↳ app/models/concerns/webhooks/outgoing/issuing_model.rb:22:in `generate_webhook'
  [1m[36mActiveStorage::Blob Load (1.3ms)[0m  [1m[34mSELECT "active_storage_blobs".* FROM "active_storage_blobs" INNER JOIN "active_storage_attachments" ON "active_storage_blobs"."id" = "active_storage_attachments"."blob_id" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m  [["record_id", 14], ["record_type", "Inspectionpointactual"], ["name", "image"], ["LIMIT", 1]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mActiveStorage::Attachment Load (0.4ms)[0m  [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m  [["record_id", 14], ["record_type", "Inspectionpointactual"], ["name", "image"], ["LIMIT", 1]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mActiveStorage::Blob Create (1.0ms)[0m  [1m[32mINSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "byte_size", "checksum", "created_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m  [["key", "3u4gi2yl12sgezxosjcyjqn3jcnq"], ["filename", "lunch.png"], ["content_type", "image/png"], ["metadata", "{\"identified\":true}"], ["byte_size", 330705], ["checksum", "gEmvN+TohyaBrLnM4b2PKg=="], ["created_at", "2020-06-26 23:51:19.232257"]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mActiveStorage::Attachment Create (0.9ms)[0m  [1m[32mINSERT INTO "active_storage_attachments" ("name", "record_type", "record_id", "blob_id", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m  [["name", "image"], ["record_type", "Inspectionpointactual"], ["record_id", 14], ["blob_id", 7], ["created_at", "2020-06-26 23:51:19.235727"]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mInspectionpointactual Update (1.0ms)[0m  [1m[33mUPDATE "inspectionpointactuals" SET "updated_at" = $1 WHERE "inspectionpointactuals"."id" = $2[0m  [["updated_at", "2020-06-26 23:51:19.238212"], ["id", 14]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[35m (0.5ms)[0m  [1m[35mCOMMIT[0m
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
[36m  Disk Storage (2.9ms) [0m[32mUploaded file to key: 3u4gi2yl12sgezxosjcyjqn3jcnq (checksum: gEmvN+TohyaBrLnM4b2PKg==)[0m
[ActiveJob] Enqueued ActiveStorage::AnalyzeJob (Job ID: 4cd01694-fd76-4baf-8cb7-d3feabdd9898) to Sidekiq(active_storage_analysis) with arguments: #<GlobalID:0x00007f8a2c20a838 @uri=#<URI::GID gid://campfire/ActiveStorage::Blob/7>>
Redirected to http://localhost:3000/account/inspectionpointactuals/14
Completed 302 Found in 45ms (ActiveRecord: 8.5ms | Allocations: 23978)
Rendered/Users/evanliewer/.rvm/gems/ruby-2.6.4/gems/xray-rails-0.3.2/app/views//u xray\u bar.html.erb(持续时间:8.0ms;分配:7416)
取消订阅频道:{“频道”:“Spreads::CollectionsChannel”,“集合名称”:“inspectionpointactuals”}
在2020-06-26 16:50:17-0700为::1启动了修补程序“/account/inspectionactuals/6”
按帐户处理::InspectionActualController#更新为HTML
参数:{“真实性令牌”=>“BJVUGE87RQDPFOLPTOK0JFDGBSKLDUX8KNXHLHL+DvUzvZgcl+rr0UgCjPFVBqUYx6mF680gBCYimG8sS/4w=>,“检查实际”=>{“日期”=>“2020年6月25日”,“用户id”=>“1”,“名称”=>“现在”,“说明”=>“测试图像”,“检查点实际属性”=>{“响应”>,“id”=>“16”=>,“id”=>“1”,“图像”=>,{>“14”}},“提交”=>“更新检查实际”,“id”=>“6”}
[1m[36mUser负载(0.3ms)[0m[1m[34M选择“用户”。*从“用户”中选择“用户”。“id”=由“用户”订购的$1。“id”ASC限额$2[0m[“id”,1],“限额”,1]]
[1m[36分钟预期实际负载(0.3ms)[0m[1m[34毫秒从“检查实际”中选择“检查实际”。*其中“检查实际”。“id”=$1限制$2[0m[“id”,6],“限制”,1]]
[1m[36min检查负荷(0.3ms)[0m[1m[34m选择“检查”。*从“检查”中选择“检查”。“id”=$1限值$2[0m[“id”,4],“限值”,1]]
[1m[36M团队负载(0.2ms)[0m[1m[34M选择“团队”。*从“团队”中选择“团队”。“id”=$1限制$2[0m[“id”,1],“限制”,1]]
↳ app/controllers/account/application\u controller.rb:46:in'load\u team'
[1m[36mUser更新(0.8ms)[0m[1m[33mUPDATE”用户”设置“当前团队id”=$1,其中“用户”。“id”=$2[0m[[当前团队id”,1],“id”,1]]
↳ app/controllers/account/application\u controller.rb:56:in'load\u team'
[1m[35m(0.2ms)[0m[1m[35mBEGIN[0m
↳ app/controllers/account/inspectionactuals_controllers.rb:44:in'block in update'
[1m[36分钟检查点实际负载(0.5毫秒)[0m[1m[34毫秒从“检查点实际负载”中选择“检查点实际负载”。*其中“检查点实际负载”。“检查点实际负载”=$1和“检查点实际负载”。$2,$3,$4中的“检查点实际负载”[0m[“检查点实际负载”,6],“id”,16],“id”,15],“id”,14]]
↳ app/controllers/account/inspectionactuals_controllers.rb:44:in'block in update'
[1m[36mUser负载(0.3ms)[0m[1m[34M选择“用户”。*从“用户”中选择“用户”。“id”=$1限制$2[0m[“id”,1],“限制”,1]]
↳ app/controllers/account/inspectionactuals_controllers.rb:44:in'block in update'
[1m[36分钟预期实际负载(0.2ms)[0m[1m[34毫秒从“检查实际”中选择“检查实际”。*其中“检查实际”。“id”=$1限制$2[0m[“id”,6],“限制”,1]]
↳ app/controllers/account/inspectionactuals_controllers.rb:44:in'block in update'
[1m[36mWebhooks::Outgoing::EventType Load(0.2ms)[0m[1m[34M选择“webhooks\u Outgoing\u event\u types”。*从“webhooks\u Outgoing\u event\u types”中选择“webhooks\u Outgoing\u event\u types”。“name”=1美元限额$2[0m[“name”,“inspectionactual.Update”],[“LIMIT”,1]]
↳ app/models/concerns/webhook/outgoing/issueing_model.rb:22:in'generate_webhook'
[1m[36mInspectionpointactual Update(0.4ms)[0m[1m[33mUPDATE“inspectionpointactuals”设置“response”=$1,“updated_at”=$2,其中“inspectionpointactuals”。“id”=$3[0m[“response”,“,[“updated_at”,“2020-06-26 23:50:17.600405”],[“id”,16]]
↳ app/controllers/account/inspectionactuals_controllers.rb:44:in'block in update'
[1m[36mWebhooks::Outgoing::EventType Load(0.2ms)[0m[1m[34M选择“webhooks\u Outgoing\u event\u types”。*从“webhooks\u Outgoing\u event\u types”中选择“webhooks\u Outgoing\u event\u types”。“name”=$1限制$2[0m[“name”,“inspectionpointactual.Update”],[“LIMIT”,1]]
↳ app/models/concerns/webhook/outgoing/issueing_model.rb:22:in'generate_webhook'
[1m[36min检查点荷载(0.3ms)[0m[1m[34m选择“检查点”。*从“检查点”中选择“检查点”。“检查id”=$1[0m[[“检查id”,4]]
↳ app/models/inspectionactual.rb:33:in“创建输入点”
[1m[36分钟检查点实际负载(0.3毫秒)[0m[1m[34毫秒从“检查点实际值”中选择“检查点实际值”。*其中“检查点实际值”。“检查点实际值id”=$1和“检查点实际值”。“名称”=$2和“inspe”
Rendered /Users/evanliewer/.rvm/gems/ruby-2.6.4/gems/xray-rails-0.3.2/app/views/_xray_bar.html.erb (Duration: 7.1ms | Allocations: 7416)
Unsubscribing from channel: {"channel":"Sprinkles::CollectionsChannel","collection_name":"inspectionpointactuals"}
Started PATCH "/account/inspectionpointactuals/14" for ::1 at 2020-06-26 16:51:19 -0700
Processing by Account::InspectionpointactualsController#update as HTML
  Parameters: {"authenticity_token"=>"vfob+2B1WXl7WJMcaHcpRyfYNjlwBhPaiHOxz1y1GkGDR38xPYxsFyBSPC4LDcOsgNKM3Y1+ZvnQrI4sRySgpw==", "inspectionpointactual"=>{"name"=>"image", "description"=>"image", "response"=>"", "image"=>#<ActionDispatch::Http::UploadedFile:0x00007f8a2c131ec0 @tempfile=#<Tempfile:/var/folders/_3/rc02kyfx3hv9ct02ymhb33rc0000gn/T/RackMultipart20200626-35070-1c5i4ng.png>, @original_filename="lunch.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"inspectionpointactual[image]\"; filename=\"lunch.png\"\r\nContent-Type: image/png\r\n">}, "commit"=>"Update Inspectionpointactual", "id"=>"14"}
  [1m[36mUser Load (0.4ms)[0m  [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
  [1m[36mInspectionpointactual Load (0.4ms)[0m  [1m[34mSELECT "inspectionpointactuals".* FROM "inspectionpointactuals" WHERE "inspectionpointactuals"."id" = $1 LIMIT $2[0m  [["id", 14], ["LIMIT", 1]]
  [1m[36mInspectionactual Load (0.3ms)[0m  [1m[34mSELECT "inspectionactuals".* FROM "inspectionactuals" WHERE "inspectionactuals"."id" = $1 LIMIT $2[0m  [["id", 6], ["LIMIT", 1]]
  [1m[36mInspection Load (0.2ms)[0m  [1m[34mSELECT "inspections".* FROM "inspections" WHERE "inspections"."id" = $1 LIMIT $2[0m  [["id", 4], ["LIMIT", 1]]
  [1m[36mTeam Load (0.4ms)[0m  [1m[34mSELECT "teams".* FROM "teams" WHERE "teams"."id" = $1 LIMIT $2[0m  [["id", 1], ["LIMIT", 1]]
  ↳ app/controllers/account/application_controller.rb:46:in `load_team'
  [1m[36mUser Update (0.9ms)[0m  [1m[33mUPDATE "users" SET "current_team_id" = $1 WHERE "users"."id" = $2[0m  [["current_team_id", 1], ["id", 1]]
  ↳ app/controllers/account/application_controller.rb:56:in `load_team'
  [1m[35m (0.2ms)[0m  [1m[35mBEGIN[0m
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mInspectionpointactual Update (0.4ms)[0m  [1m[33mUPDATE "inspectionpointactuals" SET "response" = $1, "updated_at" = $2 WHERE "inspectionpointactuals"."id" = $3[0m  [["response", ""], ["updated_at", "2020-06-26 23:51:19.219950"], ["id", 14]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mWebhooks::Outgoing::EventType Load (0.2ms)[0m  [1m[34mSELECT "webhooks_outgoing_event_types".* FROM "webhooks_outgoing_event_types" WHERE "webhooks_outgoing_event_types"."name" = $1 LIMIT $2[0m  [["name", "inspectionpointactual.updated"], ["LIMIT", 1]]
  ↳ app/models/concerns/webhooks/outgoing/issuing_model.rb:22:in `generate_webhook'
  [1m[36mActiveStorage::Blob Load (1.3ms)[0m  [1m[34mSELECT "active_storage_blobs".* FROM "active_storage_blobs" INNER JOIN "active_storage_attachments" ON "active_storage_blobs"."id" = "active_storage_attachments"."blob_id" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m  [["record_id", 14], ["record_type", "Inspectionpointactual"], ["name", "image"], ["LIMIT", 1]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mActiveStorage::Attachment Load (0.4ms)[0m  [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m  [["record_id", 14], ["record_type", "Inspectionpointactual"], ["name", "image"], ["LIMIT", 1]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mActiveStorage::Blob Create (1.0ms)[0m  [1m[32mINSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "byte_size", "checksum", "created_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m  [["key", "3u4gi2yl12sgezxosjcyjqn3jcnq"], ["filename", "lunch.png"], ["content_type", "image/png"], ["metadata", "{\"identified\":true}"], ["byte_size", 330705], ["checksum", "gEmvN+TohyaBrLnM4b2PKg=="], ["created_at", "2020-06-26 23:51:19.232257"]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mActiveStorage::Attachment Create (0.9ms)[0m  [1m[32mINSERT INTO "active_storage_attachments" ("name", "record_type", "record_id", "blob_id", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m  [["name", "image"], ["record_type", "Inspectionpointactual"], ["record_id", 14], ["blob_id", 7], ["created_at", "2020-06-26 23:51:19.235727"]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[36mInspectionpointactual Update (1.0ms)[0m  [1m[33mUPDATE "inspectionpointactuals" SET "updated_at" = $1 WHERE "inspectionpointactuals"."id" = $2[0m  [["updated_at", "2020-06-26 23:51:19.238212"], ["id", 14]]
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
  [1m[35m (0.5ms)[0m  [1m[35mCOMMIT[0m
  ↳ app/controllers/account/inspectionpointactuals_controller.rb:42:in `block in update'
[36m  Disk Storage (2.9ms) [0m[32mUploaded file to key: 3u4gi2yl12sgezxosjcyjqn3jcnq (checksum: gEmvN+TohyaBrLnM4b2PKg==)[0m
[ActiveJob] Enqueued ActiveStorage::AnalyzeJob (Job ID: 4cd01694-fd76-4baf-8cb7-d3feabdd9898) to Sidekiq(active_storage_analysis) with arguments: #<GlobalID:0x00007f8a2c20a838 @uri=#<URI::GID gid://campfire/ActiveStorage::Blob/7>>
Redirected to http://localhost:3000/account/inspectionpointactuals/14
Completed 302 Found in 45ms (ActiveRecord: 8.5ms | Allocations: 23978)
 def changed_for_autosave?
      if image.present?
    super || image.changed_for_autosave?
      end
  end