From 845a4d530ff7fd37ca8679460e1bdbef00932586 Mon Sep 17 00:00:00 2001 From: Georgi Knox Date: Wed, 19 Feb 2014 11:33:47 +1100 Subject: [PATCH 1/2] Nil check for public email fixes #11 where view threw exception attempting to access nil public email --- api/ruby/basics-of-authentication/views/advanced.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/ruby/basics-of-authentication/views/advanced.erb b/api/ruby/basics-of-authentication/views/advanced.erb index 5438829a4..af7582988 100644 --- a/api/ruby/basics-of-authentication/views/advanced.erb +++ b/api/ruby/basics-of-authentication/views/advanced.erb @@ -7,7 +7,7 @@

Well, well, well, <%= login %>!

- <% if !email.empty? %> It looks like your public email address is <%= email %>. + <% if if !email.nil? && !email.empty? %> It looks like your public email address is <%= email %>. <% else %> It looks like you don't have a public email. That's cool. <% end %>

From 57fcf5613ebdf2195abd58b3e563bf0282d41082 Mon Sep 17 00:00:00 2001 From: Georgi Knox Date: Wed, 19 Feb 2014 16:32:32 +1100 Subject: [PATCH 2/2] removed typo with if --- api/ruby/basics-of-authentication/views/advanced.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/ruby/basics-of-authentication/views/advanced.erb b/api/ruby/basics-of-authentication/views/advanced.erb index af7582988..6b648c600 100644 --- a/api/ruby/basics-of-authentication/views/advanced.erb +++ b/api/ruby/basics-of-authentication/views/advanced.erb @@ -7,7 +7,7 @@

Well, well, well, <%= login %>!

- <% if if !email.nil? && !email.empty? %> It looks like your public email address is <%= email %>. + <% if !email.nil? && !email.empty? %> It looks like your public email address is <%= email %>. <% else %> It looks like you don't have a public email. That's cool. <% end %>