Skip to content
smart-answers
HTML Ruby Other
Find file
Latest commit 4e32fc0 Apr 29, 2016 @pmanrubia pmanrubia Merge pull request #2495 from alphagov/fix-lint-useless-assignment-ru…
…bocop-violation-introduced-in-pr-2494

Fix Lint/UselessAssignment Rubocop violation
Failed to load latest commit information.
app Use block arg in SmartAnswersController#with_format Apr 19, 2016
bin Fix Style/ExtraSpacing violations Apr 19, 2016
config Fix Style/ExtraSpacing violations Apr 19, 2016
db Initial blank rails app. Oct 27, 2011
doc Remove v2-related code and documentation Apr 19, 2016
lib Revert "Remove Outcome#transition method" Apr 29, 2016
log Initial blank rails app. Oct 27, 2011
public Remove dangling symlinks Aug 13, 2012
script Fix Lint/UnusedMethodArgument violations Apr 19, 2016
test Fix Lint/UselessAssignment Rubocop violation Apr 29, 2016
vendor Fix js errors in chrome 35 May 27, 2014
.gitignore Don't track coverage directory Jun 29, 2012
.rubocop.yml Exclude tmp directory from Rubocop checks Mar 30, 2016
.rubocop_todo.yml Fix Lint/UnusedMethodArgument violations Apr 19, 2016
.ruby-version Upgrade Ruby from v2.2.4 to 2.3.0 Mar 10, 2016
CONTRIBUTING.md Merge pull request #2013 from alphagov/update-documentation-about-con… Oct 15, 2015
Gemfile Update Rails to version 4.2.6 Mar 10, 2016
Gemfile.lock Update Rails to version 4.2.6 Mar 10, 2016
LICENSE.md Correct attribution of copyright Mar 11, 2015
README.md Documentation for the new-style testing approach Mar 22, 2016
Rakefile Disable logging in test Jul 10, 2012
config.ru Fix Style/ExtraSpacing violations Apr 19, 2016
install.sh Make install.sh executable Dec 8, 2014
jenkins.sh Exclude existing Rubocop violations using auto-generated config Mar 30, 2016
jenkins_branches.sh Add jenkins_branches.sh Apr 2, 2014
startup.sh Add a handy script to start up the app in development. Feb 2, 2012
startup_heroku.sh Update Heroku settings from preview to integration Jan 21, 2016

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

  • 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

See:

Running the test suite

$ bundle exec rake

Smart Answers

 Smart Answer flow development

Smart Answers app development

Debugging

Licence

MIT License

Something went wrong with that request. Please try again.