Skip to content
smart-answers
HTML Ruby Other
Find file
Latest commit 11d08b4 @erikse erikse Merge pull request #2166 from alphagov/child_maintenance_content_nov2015
Child maintenance calculator update for November 2015
Failed to load latest commit information.
app Add ability to handle exception raised during render
bin Remove bin/smartdown
config Improve readability of production.rb config file
db Initial blank rails app.
doc Update Trello card title and links to reflect integration environment
lib Remove protocol and host from URI in outcome
log Initial blank rails app.
public Remove dangling symlinks
script Avoid rescuing i18n errors in script
test Regenerate checksums for calculate your child maintenance
vendor Fix js errors in chrome 35
.gitignore Don't track coverage directory
.ruby-version Upgrade Smart Answers to Ruby 2.2.4
CONTRIBUTING.md Merge pull request #2013 from alphagov/update-documentation-about-con…
Gemfile Upgrade Smart Answers to Ruby 2.2.4
Gemfile.lock Remove therubyracer gem
LICENSE.md Correct attribution of copyright
README.md Remove therubyracer gem
Rakefile Disable logging in test
config.ru Initial blank rails app.
install.sh Make install.sh executable
jenkins.sh Generate a schema-valid content-item
jenkins_branches.sh Add jenkins_branches.sh
startup.sh Add a handy script to start up the app in development.
startup_heroku.sh Update Heroku settings from preview to integration

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.