Ruby HTML Other
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Merge pull request #3491 from alphagov/add-none-option Jun 20, 2018
bin Remove Airbrake Sep 20, 2017
config Ignore a false positive about unsanitized user input Aug 2, 2018
db Initial blank rails app. Oct 27, 2011
doc Update to doc on deploying Aug 14, 2018
lib Round pay up to the next pence Aug 16, 2018
log Initial blank rails app. Oct 27, 2011
public Remove dangling symlinks Aug 13, 2012
script Rename "Gambia" to "The Gambia" Aug 3, 2018
test Update checksums and artefacts Aug 17, 2018
vendor Fix js errors in chrome 35 May 27, 2014
.gitignore Add byebug for debugging Jun 16, 2017
.rubocop.yml Exclude test artefacts from linting Jan 24, 2018
.ruby-version Bump to ruby-2.5.1 May 29, 2018
CONTRIBUTING.md Merge pull request #2013 from alphagov/update-documentation-about-con… Oct 15, 2015
Gemfile Merge pull request #3643 from alphagov/dependabot/bundler/capybara-3.6.0 Aug 17, 2018
Gemfile.lock Merge pull request #3638 from alphagov/dependabot/bundler/uglifier-4.… Aug 17, 2018
Jenkinsfile Enable Brakeman Aug 2, 2018
LICENSE.md Correct attribution of copyright Mar 11, 2015
README.md Remove deploy to Heroku link from README Jun 1, 2018
Rakefile Change the way logging works for test Sep 22, 2016
app.json Configure smartanswers heroku apps to use hobby dyno plan May 4, 2018
config.ru Fix Style/ExtraSpacing violations Apr 19, 2016
install.sh Use content store for breadcrumbs, sidebar & metadata Nov 4, 2016
startup.sh Add --live flag to allow easy local development Jun 26, 2017
startup_heroku.sh Don't run open if it doesn't exist Jun 2, 2017

README.md

Smart Answers

Smart answers are a great tool for content designers to present complex information in a quick and simple way. Defining what they are – decision trees? calculators? tools? is immaterial – what they do is provide a reusable technical framework to build a quick and simple answer to a complex question.

Read more in Lisa Scott's GDS blog post.

Screenshots

Student Finance Forms screenshot

Live examples

Nomenclature

  • Smart Answer: The flow, questions and outcomes.

  • Flow: Defines the questions, outcomes and the rules for navigating between them.

  • Landing page: Contains a description of the Smart Answer and the "Start now" button that leads to the first question.

  • Question page: Contains an individual question that's asked in order to help arrive at at an outcome.

  • Outcome page: Contains the result of the Smart Answer based on responses to individual questions.

Technical documentation

This is a Ruby on Rails application that contains:

  • A Rails application to serve Smart Answers
  • A DSL for creating Smart Answers
  • The Smart Answers that appear on GOV.UK

NOTE. This application doesn't use a database and as such it does not include the ActiveRecord Railtie in application.rb.

Dependencies

Running the application

See:

Running the test suite

$ bundle exec rake

Smart Answers

Smart Answer flow development

Smart Answers app development

Debugging

Registering on GOV.UK

  • bundle exec rake publishing_api:publish will send smart answers to the publishing-api.

Search indexing

Content is now indexed automatically via the publishing API

Licence

MIT License