Skip to content

Instantly share code, notes, and snippets.

@psy-q
Created June 22, 2015 15:49
Show Gist options
  • Select an option

  • Save psy-q/1cce1a1b50a0ee1a0137 to your computer and use it in GitHub Desktop.

Select an option

Save psy-q/1cce1a1b50a0ee1a0137 to your computer and use it in GitHub Desktop.
Indent levels wrong
{# "if ... and" means to test if it's true, not just if it's defined #}
production:
adapter: mysql2
encoding: utf8
database: {{ mysql_database }}
username: {{ mysql_user }}
password: {{ mysql_password }}
{% if local_database is defined and local_database -%}
host: localhost
{% else -%}
host: {{ mysql_host }}
{% endif %}
production:
adapter: mysql2
encoding: utf8
database: {{ mysql_database }}
username: {{ mysql_user }}
password: {{ mysql_password }}
{# "if ... and" means to test if it's true, not just if it's defined #}
{% if local_database is defined and local_database -%}
host: localhost
{% else -%}
host: {{ mysql_host }}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment