Fix .class to .class.to_s

This commit is contained in:
Christophe Vilayphiou committed 2012-07-30 18:34:54 +08:00
1 parent f3ccbce5c8
commit 39b63a970c
10 files changed
+18 -18

No files matched your search

+2 -2
View File
@@ -515,7 +515,7 @@
<% @recent_updated.each do |object| %>
<tr>
<td><%= link_to ((object[0].title rescue nil) || (object[0].page.title rescue nil)), get_link_to_object(object[0]) %></td>
<td class="span2"><%= link_to t("dashboard.#{object[0].class.underscore}"), get_link(object[0].class.underscore) %></td>
<td class="span2"><%= link_to t("dashboard.#{object[0].class.to_s.underscore}"), get_link(object[0].class..to_sunderscore) %></td>
</tr>
<% end %>
</tbody>
@@ -553,7 +553,7 @@
<% @most_visited.each do |object| %>
<tr>
<td><%= link_to ((object[0].title rescue nil) || (object[0].page.title rescue nil)), get_link_to_object(object[0]) %></td>
<td class="span2"><%= link_to t("dashboard.#{object[0].class.underscore}"), get_link(object[0].class.underscore) %></td>
<td class="span2"><%= link_to t("dashboard.#{object[0].class.to_s.underscore}"), get_link(object[0].class.to_s.underscore) %></td>
<td class="span2"><%= object[1] %></td>
</tr>
<% end %>
+1 -1
View File
@@ -2,4 +2,4 @@
<%= render 'admin/items/site_map_left_bar' %>
<% end -%>
<%= render "admin/#{@item.class.downcase.pluralize}/show" %>
<%= render "admin/#{@item.class.to_s.downcase.pluralize}/show" %>
+1 -1
View File
@@ -1,5 +1,5 @@
$('#back_main').empty();
<% case @item.class %>
<% case @item.class.to_s %>
<% when 'Page' %>
$('#back_main').append("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
<% when 'Link' %>