Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update for Ruby 2.0

  • Loading branch information...
commit f4ffeff0785263ee13bc89de466c3a1a6a5686a8 1 parent e4fc26c
@marktabler authored
View
2  Gemfile
@@ -1,5 +1,7 @@
source 'https://rubygems.org'
+ruby '2.0.0'
+
gem 'bootstrap-sass'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
View
2  app/views/admin/licenses/edit.html.erb
@@ -10,6 +10,6 @@
<h4>Installed on:</h4>
<ul>
<% @license.machines.each do |machine| %>
- <%= link_to machine.barcode, machine_path(machine) %>
+ <li><%= link_to machine.barcode, machine_path(machine) %></li>
<% end %>
</ul>
View
2  app/views/layouts/_nav.html.erb
@@ -1,5 +1,5 @@
<ul class='nav'>
-<li><%= link_to "Log Out #{current_user.name}", logout_path %></li>
+<li><%= link_to "Log Out #{current_user.name}", logout_path, method: :delete %></li>
<li><%= link_to "View Licenses", licenses_path %></li>
<li><%= link_to "View Assets", machines_path %></li>
<% if current_user.admin? %>
View
2  app/views/layouts/application.html.erb
@@ -15,7 +15,7 @@
<header class="navbar navbar-fixed-top">
<nav class="navbar-inner">
<div class="container">
- <%= render partial: 'layouts/nav' %>
+ <%= render partial: 'layouts/nav' if current_user %>
</div>
</nav>
</header>
View
2  config/routes.rb
@@ -21,6 +21,8 @@
resources :licenses
end
+ root 'sessions#new'
+
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
View
1  db/seeds.rb
@@ -8,6 +8,7 @@
u = User.create(name: "Luchtman", pincode: "100214")
u.update_attribute(:admin, true)
+t = User.create(name: "Tabler", pincode: "2221222")
m = Machine.create(barcode: "0000")
l = License.create(name: "Norrington")
Please sign in to comment.
Something went wrong with that request. Please try again.