Class: Decidim::UploadValidationsController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::UploadValidationsController
- Includes:
- FormFactory
- Defined in:
- app/controllers/decidim/upload_validations_controller.rb
Overview
The controller to handle upload validations
Instance Method Summary collapse
Methods included from UserBlockedChecker
#check_user_block_status, #check_user_not_blocked
Methods included from NeedsSnippets
Methods included from HttpCachingDisabler
Methods included from HasStoredPath
#skip_store_location?, #store_current_location
Methods included from RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/decidim/upload_validations_controller.rb', line 12 def create @form = form(Decidim::UploadValidationForm).from_params(params) ValidateUpload.call(@form) do on(:ok) do render json: [] end on(:invalid) do |errors| render json: errors end end end |
#organization_time_zone ⇒ Object
26 27 28 29 30 |
# File 'app/controllers/decidim/upload_validations_controller.rb', line 26 def organization_time_zone return Rails.application.config.time_zone unless current_organization super end |