Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make only nicknames quoted.

  • Loading branch information...
commit a15e41fd94285342fc52714455c913765cc7a300 1 parent 6ca0611
Jared Mehle authored
4 app/views/accounts/_account.html.erb
View
@@ -14,8 +14,8 @@
<% unless account.names.empty? %>
<td>
<ul>
- <%= render :partial => 'name', :collection => account.names %>
- <%= render :partial => 'name', :collection => account.nicks unless account.nicks.empty? %>
+ <%= render :partial => 'name', :collection => account.names, :locals => { :is_nickname => false } %>
+ <%= render :partial => 'name', :collection => account.nicks, :locals => { :is_nickname => true } unless account.nicks.empty? %>
</ul>
</td>
<% end %>
6 app/views/accounts/_name.html.erb
View
@@ -1 +1,5 @@
-<li class="nickname"><%= '"' + name.value + '"' %></li>
+<%-
+ list_item_class = is_nickname ? 'nickname' : ''
+ formatted_name = is_nickname ? "\"#{name.value}\"" : name.value
+ %>
+<li class=""><%= formatted_name %></li>
Please sign in to comment.
Something went wrong with that request. Please try again.