hpi-swt2/workshop-portal

View on GitHub
app/views/requests/show.html.erb

Summary

Maintainability
Test Coverage
<%- model_class = Request -%>
<div class="page-header">
  <h1><%=t '.title', :default => model_class.model_name.human.titleize %></h1>
</div>

<dl class="dl-horizontal">
  <dt><strong><%= model_class.human_attribute_name(:topics) %>:</strong></dt>
  <dd><%= @request.topics %></dd>
  <dt><strong><%= model_class.human_attribute_name(:user_id) %>:</strong></dt>
  <dd><%= @request.user_id %></dd>
</dl>

<%= link_to t('.back', :default => t("helpers.links.back")),
              requests_path, :class => 'btn btn-default'  %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
              edit_request_path(@request), :class => 'btn btn-default' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
              request_path(@request),
              :method => 'delete',
              :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
              :class => 'btn btn-danger' %>