Skip to content

Commit

Permalink
Nil check for public email
Browse files Browse the repository at this point in the history
fixes github#11 where view threw exception attempting to access nil public email
  • Loading branch information
georgicodes committed Feb 19, 2014
1 parent 11eda73 commit 845a4d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/ruby/basics-of-authentication/views/advanced.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<body>
<p>Well, well, well, <%= login %>!</p>
<p>
<% 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 %>
</p>
Expand Down

0 comments on commit 845a4d5

Please sign in to comment.