Class: MetadataPresenter::FileController

Inherits:
EngineController show all
Defined in:
app/controllers/metadata_presenter/file_controller.rb

Instance Method Summary collapse

Methods inherited from EngineController

#allow_analytics?, #analytics_cookie_name, #analytics_tags_present?, #answered?, #authorised_session!, #back_link, #external_or_relative_link, #get_saved_progress, #increment_record_counter, #invalidate_record, #load_autocomplete_items, #load_page_content, #maintenance_mode?, #reload_user_data, #require_basic_auth, #save_form_progress, #session_authorised?, #show_cookie_confirmation?, #show_cookie_request?

Instance Method Details

#destroyObject



3
4
5
6
# File 'app/controllers/metadata_presenter/file_controller.rb', line 3

def destroy
  remove_user_data(params[:component_id])
  redirect_back(fallback_location: root_path)
end

#remove_file_from_data(component_id, file_id) ⇒ Object



17
18
19
# File 'app/controllers/metadata_presenter/file_controller.rb', line 17

def remove_file_from_data(component_id, file_id)
  super(component_id, file_id) if defined?(super)
end

#remove_multifileObject



8
9
10
11
# File 'app/controllers/metadata_presenter/file_controller.rb', line 8

def remove_multifile
  remove_file_from_data(params[:component_id], params[:file_uuid])
  redirect_back(fallback_location: root_path)
end

#remove_user_data(component_id) ⇒ Object



13
14
15
# File 'app/controllers/metadata_presenter/file_controller.rb', line 13

def remove_user_data(component_id)
  super(component_id) if defined?(super)
end