Module: Bulkrax::GuidedImportDemoScenarios
- Extended by:
- ActiveSupport::Concern
- Included in:
- GuidedImportsController
- Defined in:
- app/controllers/concerns/bulkrax/guided_import_demo_scenarios.rb
Overview
rubocop:disable Metrics/ModuleLength
Instance Method Summary collapse
-
#demo_scenarios ⇒ Object
Serve demo scenario fixtures for frontend testing.
Instance Method Details
#demo_scenarios ⇒ Object
Serve demo scenario fixtures for frontend testing
9 10 11 12 13 14 15 16 |
# File 'app/controllers/concerns/bulkrax/guided_import_demo_scenarios.rb', line 9 def demo_scenarios file_path = Bulkrax::Engine.root.join('lib', 'bulkrax', 'data', 'demo_scenarios.json') if File.exist?(file_path) render json: File.read(file_path), status: :ok else render json: { error: I18n.t('bulkrax.importer.guided_import.flash.demo_not_available') }, status: :not_found end end |