Sha256: 7323334e32679ef00220e3a28f3e09dcf81bbdde00c5d01df9abd2228c5a665d
Contents?: true
Size: 599 Bytes
Versions: 4
Compression:
Stored size: 599 Bytes
Contents
# frozen_string_literal: true class RequestHandlerController < ActionController::Base private def document_params params.require(:document).permit(:name) end def documents Document.all end def document @document ||= documents.find(params.require(:id)) end def add_magic_reference document.reference = 'X-MAGIC-15' end def add_magic_reference_and_trigger document.update(reference: 'X-MAGIC-15') Worker.perform(document.id) end def build_magic_document documents.where(reference: 'X-MAGIC-15') .build(document_params) end end
Version data entries
4 entries across 4 versions & 1 rubygems