link_to "Show Instance", :controller => :browse, :action => :note, :id => reportable.id
end
end
-
- def report_type(report_class)
- case report_class
- when "DiaryEntry"
- t("activerecord.models.diary_entry")
- when "User"
- t("activerecord.models.user")
- when "DiaryComment"
- t("activerecord.models.diary_comment")
- when "Changeset"
- t("activerecord.models.changeset")
- when "Note"
- t("activerecord.models.note")
- end
- end
end
<% content_for :heading do %>
<h2><%= t ".title", :status => @issue.status.humanize, :issue_id => @issue.id %></h2>
-<p><%= report_type(@issue.reportable_type) %> : <%= reportable_url(@issue.reportable) %></p>
+<p><%= @issue.reportable.model_name.human %> : <%= reportable_url(@issue.reportable) %></p>
<p class="deemphasize">
<small>
<%= @issue.assigned_role %>