Permalink
Browse files

Need to check if user is a guest

  • Loading branch information...
1 parent c2ba42d commit f07ba47a1f1817519ae64486bdf2bd35bca9fdb2 @oestrich oestrich committed Nov 23, 2010
Showing with 0 additions and 25 deletions.
  1. +0 −25 app/views/books/_index.html.erb
@@ -1,30 +1,5 @@
-<% current_user.locations.each do |location| %>
- <div class='location'>
- <br />
- <h1><b><%= link_to location.name, "/locations/#{location.id}" %></b></h1>
- <br />
- <% location.books.each do |book| %>
- <% if book.borrower_user_id != nil %>
- <% buser = User.find(book.borrower_user_id) %>
- <div class='book_borrowed'>
- <%= link_to image_tag(book.image_url), book, :title => "#{buser.first_name} #{buser.last_name} is borrowing this book." %>
- <% else %>
- <div class='book'>
- <%= link_to image_tag(book.image_url), book %>
- <% end %>
- </div>
- <% end %>
-
- </div>
-<% end %>
-
-
<% @locations.each do |location| %>
- <% if current_user.locations.include?(location)
- next
- end %>
-
<div class='location'>
<br />
<h1><b><%= link_to location.name, "/locations/#{location.id}" %></b></h1>

0 comments on commit f07ba47

Please sign in to comment.