Skip to content

How to add a configurable link

Britta edited this page Aug 7, 2016 · 1 revision

Copied from https://github.com/doubleunion/arooo/pull/247:

For links to google docs, we'd rather they be configurable than be hardcoded. That means you'd set them from Admin Tools --> Configure App page.

To make something configurable you:

  • Add it to the configurable.yml file:
cool_link:
  type: text
  • Reference it somewhere:
#{ link_to "a cool link", Configurable[:cool_link] }

Then, after the code is deployed, set the value in the UI (Admin Tools --> Configure App page)!

Clone this wiki locally