Class: Avo::MediaLibraryController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- BaseApplicationController
- ApplicationController
- Avo::MediaLibraryController
- Includes:
- Pagy::Backend
- Defined in:
- app/controllers/avo/media_library_controller.rb
Constant Summary
Constants included from Concerns::FindAssociationField
Concerns::FindAssociationField::ASSOCIATIONS
Instance Method Summary collapse
Methods inherited from BaseApplicationController
#exception_logger, #turbo_frame_request?
Methods included from Concerns::FindAssociationField
Methods included from Concerns::Breadcrumbs
#add_breadcrumb, #avo_breadcrumbs
Methods included from UrlHelpers
#edit_resource_path, #new_resource_path, #preview_resource_path, #related_resources_path, #resource_attach_path, #resource_detach_path, #resource_path, #resource_view_path, #resources_path
Methods included from ApplicationHelper
#a_button, #a_link, #button_classes, #card_classes, #chart_color, #container_classes, #container_is_full_width?, #d, #decode_filter_params, #e, #empty_state, #encode_filter_params, #frame_id, #get_model_class, #input_classes, #mount_path, #number_to_social, #pagy_major_version, #possibly_rails_authentication?, #render_license_warning, #root_path_without_url, #svg, #white_panel_classes
Methods included from ResourcesHelper
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_selector_data_attributes, #record_path, #record_title, #resource_for_record, #resource_grid, #resource_show_path, #resource_table
Methods included from CommonController
#default_url_options, #extra_default_url_options
Methods included from InitializesAvo
#_current_user, #context, #init_app
Instance Method Details
#attach ⇒ Object
26 27 28 29 30 |
# File 'app/controllers/avo/media_library_controller.rb', line 26 def attach @attaching = true render :index end |
#destroy ⇒ Object
14 15 16 17 18 19 |
# File 'app/controllers/avo/media_library_controller.rb', line 14 def destroy @blob = ActiveStorage::Blob.find(params[:id]) @blob.destroy! redirect_to avo.media_library_index_path end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/avo/media_library_controller.rb', line 6 def index @attaching = false end |
#show ⇒ Object
10 11 12 |
# File 'app/controllers/avo/media_library_controller.rb', line 10 def show @blob = ActiveStorage::Blob.find(params[:id]) end |
#update ⇒ Object
21 22 23 24 |
# File 'app/controllers/avo/media_library_controller.rb', line 21 def update @blob = ActiveStorage::Blob.find(params[:id]) @blob.update!(blob_params) end |