Class: Smithy::AssetSourcesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/smithy/asset_sources_controller.rb

Instance Method Summary collapse

Instance Method Details

#presigned_upload_fieldObject



18
19
20
21
22
23
# File 'app/controllers/smithy/asset_sources_controller.rb', line 18

def presigned_upload_field
  @asset_source = AssetSource.find(params[:id])
  respond_to do |format|
    format.js
  end
end

#updateObject



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/smithy/asset_sources_controller.rb', line 7

def update
  @asset_source = AssetSource.find(params[:id])
  if @asset_source.update_attributes(filtered_params)
    flash.notice = "Your assets were saved"
    @assets = @asset_source.assets
  end
  respond_with @asset_source do |format|
    format.js { render json: AssetsDatatable.new(view_context).new_row(@assets), callback: 'assets_table_add_rows' }
  end
end