Class: ActiveStorage::AsyncVariants::StatesController

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/active_storage/async_variants/states_controller.rb

Instance Method Summary collapse

Instance Method Details

#retryObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'app/controllers/active_storage/async_variants/states_controller.rb', line 19

def retry
  @variant.blob.variant_records.where(
    variation_digest: @variant.variation.digest,
    state: "failed",
  ).destroy_all
  @variant.enqueue!

  redirect_to Rails.application.routes.url_helpers.async_variant_state_path(
    signed_blob_id: params[:signed_blob_id],
    variation_key: params[:variation_key],
    kind: params[:kind],
    direct: params[:direct],
    opts: async_variant_html_options.presence,
  ), status: :see_other
end

#showObject



16
17
# File 'app/controllers/active_storage/async_variants/states_controller.rb', line 16

def show
end