0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 17:30:29 +01:00
discourse-custom-wizard/controllers/custom_wizard/realtime_validations.rb
2021-02-05 18:29:30 +05:30

8 Zeilen
346 B
Ruby

class CustomWizard::RealtimeValidationsController < ::ApplicationController
def validate
params.require(:validation)
params.require(::CustomWizard::RealtimeValidation.types[params[:validation].to_sym][:required_params])
render_json_dump(::CustomWizard::RealtimeValidation.send(params[:validation], params, current_user))
end
end