diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/home_controller.rb | 6 | ||||
| -rw-r--r-- | app/views/home/index.html.erb | 45 |
2 files changed, 51 insertions, 0 deletions
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb new file mode 100644 index 0000000..a7d44f1 --- /dev/null +++ b/app/controllers/home_controller.rb @@ -0,0 +1,6 @@ +class HomeController < ApplicationController + def index + @licenses = License.all + @companies = Company.all + end +end diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb new file mode 100644 index 0000000..154d340 --- /dev/null +++ b/app/views/home/index.html.erb @@ -0,0 +1,45 @@ +<html> +<head> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title></title> +</head> +<body> + +<h1>oh hai</h1> +<%= link_to "all licenses", v1_licenses_path %> + +<h2>Licenses</h2> +<ul> + <% @licenses.each do |license| %> + <li><%= link_to "license #{license.id}", v1_license_path(license) %></li> +<% end %> +</ul> + +<h2>Companies</h2> +<ul> + <% @companies.each do |company| %> + <li> + <%= company.name %> + <ul> + <li> + <%= link_to "active", v1_company_licenses_path(company) %> + <ul> + <% Location.all.each do |location| %> + <li> <%= link_to location.township, v1_company_licenses_path(company, status: "active", township: location.township) %> </li> + <% end %> + </ul> + </li> + <li> + <%= link_to "expired", v1_company_licenses_path(company, status: "expired") %> + <ul> + <% Location.all.each do |location| %> + <li> <%= link_to location.township, v1_company_licenses_path(company, status: "expired", township: location.township) %> </li> + <% end %> + </ul> + </li> + </ul> + </li> +<% end %> +</ul> +</body> +</html> |
