mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
save settings from basil properly
This commit is contained in:
parent
83b2514f4e
commit
952168aaeb
@ -185,9 +185,11 @@ class BasilController < ApplicationController
|
||||
|
||||
def complete_commission
|
||||
commission = BasilCommission.find_by(job_id: params[:jobid])
|
||||
return if commission.nil?
|
||||
|
||||
commission.update(
|
||||
completed_at: DateTime.current,
|
||||
final_settings: params[:settings]
|
||||
final_settings: JSON.parse(params.fetch(:settings, {}))
|
||||
)
|
||||
|
||||
# TODO: we should attach the S3 object to the commission.image attachment
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
# TODO we can probably remove this. Need to figure out what we're using for uploads again.
|
||||
|
||||
# Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
|
||||
# We don't want to use Paperclip forever, but we're adding the following interpolater
|
||||
# to enable attaching images that are already in S3 (created by Basil) and we haven't
|
||||
# migrated to ActiveStorage yet so... here we are.
|
||||
# JK LOL THIS DOESN'T EVEN WORK SO FEEL FREE TO DELETE AT WILL
|
||||
# Paperclip.interpolates :src_or_default do |attachment, style|
|
||||
# attachment.instance.src_path ||
|
||||
# attachment.interpolator.interpolate(":class/:attachment/:id_partition/:style/:filename", attachment, style)
|
||||
# end
|
||||
Loading…
Reference in New Issue
Block a user