summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-27 19:49:24 -0700
committermo khan <mo@mokhan.ca>2014-02-27 19:49:24 -0700
commit83925e4aaa6e79d172d137bd6ba63cc204a46877 (patch)
treedcd46f2d2102c8293773feb6b8ca9ba0cf75e46c /app/views
parent3e27cf92632ffdb0f7b02dbc7781229ec82bd207 (diff)
load locations in controller
Diffstat (limited to 'app/views')
-rw-r--r--app/views/home/index.html.erb12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
index 154d340..b1a567e 100644
--- a/app/views/home/index.html.erb
+++ b/app/views/home/index.html.erb
@@ -24,7 +24,7 @@
<li>
<%= link_to "active", v1_company_licenses_path(company) %>
<ul>
- <% Location.all.each do |location| %>
+ <% @locations.each do |location| %>
<li> <%= link_to location.township, v1_company_licenses_path(company, status: "active", township: location.township) %> </li>
<% end %>
</ul>
@@ -32,11 +32,19 @@
<li>
<%= link_to "expired", v1_company_licenses_path(company, status: "expired") %>
<ul>
- <% Location.all.each do |location| %>
+ <% @locations.each do |location| %>
<li> <%= link_to location.township, v1_company_licenses_path(company, status: "expired", township: location.township) %> </li>
<% end %>
</ul>
</li>
+ <li>
+ <%= link_to "confidential", v1_company_licenses_path(company, status: "confidential") %>
+ <ul>
+ <% @locations.each do |location| %>
+ <li> <%= link_to location.township, v1_company_licenses_path(company, status: "confidential", township: location.township) %> </li>
+ <% end %>
+ </ul>
+ </li>
</ul>
</li>
<% end %>