Sha256: 2c3ab3eec64bf4341a901a5d2d1b0b88167a4742faaca01ef98ea80a99527a42
Contents?: true
Size: 883 Bytes
Versions: 142
Compression:
Stored size: 883 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/reporting" # An Audit Refreshment is a nominal sql-only activity. Its a REST #create action for consistency, # though nothing is physically created other than an ActiveJob which is queued and which will # asynchronously refresh the materialized view associated with the audit. module Renalware module Reporting class AuditRefreshmentsController < BaseController # TODO: Move to Job def create authorize audit RefreshAuditDataJob.perform_later(audit) flash.now[:notice] = "Data will be refreshed in the background, please check back later" render locals: { audit_id: audit.id } end private def audit @audit ||= Audit.find(secure_params[:audit_id]) end def secure_params params.permit(:audit_id) end end end end
Version data entries
142 entries across 142 versions & 1 rubygems