Sha256: 3fe536f264e9f7f829cbe7f18a8dd1a6dadf755290245dc9a06834bcab799990
Contents?: true
Size: 477 Bytes
Versions: 3
Compression:
Stored size: 477 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 build_magic_document documents.where(reference: 'X-MAGIC-15') .build(document_params) end end
Version data entries
3 entries across 3 versions & 1 rubygems