Skip to content

Instantly share code, notes, and snippets.

@jhoblitt
Created July 29, 2013 22:44
Show Gist options
  • Save jhoblitt/6108557 to your computer and use it in GitHub Desktop.
Save jhoblitt/6108557 to your computer and use it in GitHub Desktop.
#nil? or :undef
@@ -14,10 +14,10 @@ server {
ssl_protocols <%= @ssl_protocols %>;
ssl_ciphers <%= @ssl_ciphers %>;
ssl_prefer_server_ciphers on;
-<% if @auth_basic != :undef -%>
+<% unless @auth_basic.nil? -%>
auth_basic "<%= @auth_basic %>";
<% end -%>
-<% if @auth_basic_user_file != :undef -%>
+<% unless @auth_basic_user_file.nil? -%>
auth_basic_user_file <%= @auth_basic_user_file %>;
<% end -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment