Skip to content

Commit

Permalink
Show de livros, mais uma vez, só deixando gatinha
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrique Soares committed Oct 17, 2010
1 parent 81ba5cc commit f54278d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 5 additions & 1 deletion app/views/books/edit.html.erb
@@ -1,2 +1,6 @@
<div id="sidebar">
<p><%= image_tag(@book.small_image_path, :alt => @book.title)%></p>
</div>

<h1>Edit book</h1>
<%= render 'form' %>
<%= render 'books' %>
11 changes: 4 additions & 7 deletions app/views/books/show.html.erb
@@ -1,16 +1,13 @@
<div id="sidebar">
<% if current_user && current_user.owner_of(@book) %>
<%= link_to 'Edit', edit_book_path(@book), :class => 'button' %>
<%= link_to 'Destroy', @book, :confirm => 'Are you sure?', :method => :delete, :class => 'button' %>
<% end %>
<p><%= image_tag(@book.small_image_path, :alt => @book.title)%></p>
</div>

<h1><%=h @book.title %></h1>


<% if current_user && current_user.owner_of(@book) %>
<%= link_to 'Edit', edit_book_path(@book), :class => 'button' %>
<%= link_to 'Destroy', @book, :confirm => 'Are you sure?', :method => :delete, :class => 'button' %>
<% end %>


<p><%= ratings_for @book %></p>
<p>
<b>TITLE:</b>
Expand Down

0 comments on commit f54278d

Please sign in to comment.