From c56cb6c6824b30e3e83c8d32071829352af07217 Mon Sep 17 00:00:00 2001 From: samyou-softwire Date: Tue, 24 Mar 2026 18:31:33 +0000 Subject: [PATCH] CLDC-NONE: Lint --- docs/Gemfile | 2 +- docs/form/page.md | 1 + docs/form/question.md | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Gemfile b/docs/Gemfile index db31c828b..079c53771 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -9,6 +9,6 @@ group :development do end # used to be in standard library -gem "csv" gem "base64" gem "bigdecimal" +gem "csv" diff --git a/docs/form/page.md b/docs/form/page.md index 28e55ed03..cb22fed4f 100644 --- a/docs/form/page.md +++ b/docs/form/page.md @@ -37,6 +37,7 @@ It’s worth noting that like subsections a page can also have a `depends_on` wh Pages can contain one or more [questions](question). ## Useful Properties +
id
diff --git a/docs/form/question.md b/docs/form/question.md index 8cc2d27a8..e7694338b 100644 --- a/docs/form/question.md +++ b/docs/form/question.md @@ -121,6 +121,7 @@ end
## Useful methods +
derived?
This is function that should return true if the question is to be derived, such as where it's answer can be inferred based on another question. Setting this to true will cause the question to not be shown in CYA. The user will still be shown the question. This method is very similar to a depends_on method, but a depends_on block is used to always infer an answer of "". derived? is reliant on other code setting the answer, such as set_derived_fields!
@@ -136,9 +137,9 @@ end
## Question visibility + There are broadly 3 reasons to hide a question. Here's how to handle them. 1. The question should not be asked, answer should be derived as nil and user should not be able to change this. If so, set up a `depends_on` on the page. 2. The question should not be asked, answer should be derived as some value and user should not be able to change this. If so, set up a `depends_on` on the page and set up a `derived?`. Use a method like `set_derived_fields!` to set the answer. 3. The question should not be asked, answer should be derived as some value and user should be able to change this. If so, set up a `skip_question_in_form_flow?` method. -