Ruby HTML Other
Switch branches/tags
Latest commit 7a2b207 Apr 21, 2017 @ikennaokpala ikennaokpala committed on GitHub Merge pull request #3006 from alphagov/revert-3002-revert-2905-remove…

Revert "Revert "Remove ajax""
Failed to load latest commit information.
app Update to use start_button_href helper Apr 21, 2017
bin Fix Style/ExtraSpacing violations Apr 19, 2016
config Revert "Set up Benchmarking" Mar 27, 2017
db Initial blank rails app. Oct 27, 2011
doc Remove redundant tasks Apr 21, 2017
lib Implementation for custom start page button Apr 21, 2017
log Initial blank rails app. Oct 27, 2011
public Remove dangling symlinks Aug 13, 2012
script Remove unused code for marriage-abroad Turkey Mar 23, 2017
test Implementation for custom start page button Apr 21, 2017
vendor Fix js errors in chrome 35 May 27, 2014
.gitignore Don't track coverage directory Jun 29, 2012
.rubocop.yml Remove .rubocop_todo.yml and related documentation Jun 1, 2016
.ruby-version Bump ruby to 2.3.1 Oct 25, 2016 Merge pull request #2013 from alphagov/update-documentation-about-con… Oct 15, 2015
Gemfile Bump govuk_ab_testing version Mar 20, 2017
Gemfile.lock Bump govuk_ab_testing version Mar 20, 2017
Jenkinsfile Add build parameters for content schema tests Feb 21, 2017 Correct attribution of copyright Mar 11, 2015 Remove panopticon registration Jan 10, 2017
Rakefile Change the way logging works for test Sep 22, 2016
app.json Update plek content store url Dec 1, 2016 Fix Style/ExtraSpacing violations Apr 19, 2016 Use content store for breadcrumbs, sidebar & metadata Nov 4, 2016 Move environment variables to test helper Nov 3, 2016 Add Apr 2, 2014 Add a handy script to start up the app in development. Feb 2, 2012 Change plek service content store uri Nov 11, 2016

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.



Student Finance Forms screenshot

Live examples


  • 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.


  • alphagov/static: provides static assets (JS/CSS) and the GOV.UK templates.
  • nodejs/node: provides JS runtime for precompiling assets for deployment

Running the application


Running the test suite

$ bundle exec rake

Smart Answers

### Smart Answer flow development

Smart Answers app development


Registering on GOV.UK

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

Search indexing

  • bundle exec rake rummager:index will send the data to Rummager for indexing in search.


MIT License