Class: Decidim::OpenDataController

Inherits:
ApplicationController show all
Defined in:
decidim-core/app/controllers/decidim/open_data_controller.rb

Instance Method Summary collapse

Methods included from UserBlockedChecker

#check_user_block_status, #check_user_not_blocked

Methods included from NeedsSnippets

#snippets

Methods included from HttpCachingDisabler

#disable_http_caching

Methods included from HasStoredPath

#skip_store_location?, #store_current_location

Methods included from RegistersPermissions

register_permissions

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#downloadObject


5
6
7
8
9
10
11
12
13
# File 'decidim-core/app/controllers/decidim/open_data_controller.rb', line 5

def download
  if uploader.attached?
    redirect_to uploader.path
  else
    schedule_open_data_generation
    flash[:alert] = t("decidim.open_data.not_available_yet")
    redirect_back fallback_location: root_path
  end
end