Skip to content

Commit

Permalink
update show partials
Browse files Browse the repository at this point in the history
  • Loading branch information
tian-im committed Feb 3, 2016
1 parent e6f4b36 commit 68cc0d8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/wallaby/resources/show/_belongs_to.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<%= link_to_resource value, metadata[:class] %>
<%= link_to_resource value, metadata[:class] if value %>
<%= link_to_resource nil, metadata[:class] %>
1 change: 1 addition & 0 deletions app/views/wallaby/resources/show/_has_many.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<% unique_collection = value.uniq %>
<%= raw unique_collection.map { |item| link_to_resource item }.join(', ') %>
<%= link_to_resource nil, metadata[:class] %>
8 changes: 8 additions & 0 deletions app/views/wallaby/resources/show/_inet.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% if value.nil? %>
<%= null %>
<% else %>
<%= value %>
<%= link_to "http://ip-api.com/##{ value }", target: :_blank do %>
<i class="glyphicon glyphicon-new-window"></i>
<% end %>
<% end %>

0 comments on commit 68cc0d8

Please sign in to comment.