Skip to content

Conversation

@leandroradusky
Copy link
Contributor

@leandroradusky leandroradusky commented Nov 7, 2022

Closes #1776.

To correctly print the blinded attributes, both in the normal and the bulk print, the SamplePresenter object is passed to the PDF generator (instead of Sample as it was before, which wasn't blinding.

Before, incorrectly, blinded attributes were printed, now we can observe they don't:

image

Copy link
Contributor

@ysbaddaden ysbaddaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

I'm just not fond of form in the naming since they're not a SampleForm it could be confusing. Maybe we can just avoid naming a variable? For example:

locals: { sample: SamplePresenter.new(@sample, request.format) }

locals: { samples: samples.preload(:sample_identifiers).map { |s| SamplePresenter.new(s, request.format) } }

@leandroradusky leandroradusky merged commit 0c30838 into main Nov 10, 2022
@leandroradusky leandroradusky deleted the fix/1776-printing-blinded-labels branch November 10, 2022 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Printing blinded labels

3 participants