Class: ActsAsCalculatorEditor::ExportsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ActsAsCalculatorEditor::ExportsController
- Defined in:
- app/controllers/acts_as_calculator_editor/exports_controller.rb
Overview
Export is a gap the core gem leaves open: it reads the import document schema and has no
reverse (docs/core-gem-contract.md §4.2). What comes out here is that import shape —
not the shape SerializeFormula and friends emit, which differ in four ways that would
each quietly produce a file that does not round-trip.
?full_history=true widens the formulas section from active versions to every version.
It does not widen templates, which stay current-only for the reason ExportTemplates
explains.
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/controllers/acts_as_calculator_editor/exports_controller.rb', line 13 def show document = BuildExportDocument.(key: params[:key], scope: params[:scope], full_history: full_history?) send_data JSON.pretty_generate(document), filename:, type: "application/json", disposition: disposition end |