Permalink
Browse files

Cleaned up some ui

  • Loading branch information...
1 parent 160d303 commit 7892f7803763d88b706e883ef55c9824c325f376 @Milner08 committed May 22, 2012
@@ -1,4 +1,4 @@
-<%= form_for(@user.reviews.build()) do |f| %>
+<%= form_for(@review) do |f| %>
<%= render 'shared/error_messages', object: f.object %>
<div class="field">
<%= f.text_area :content, placeholder: "Compose new review..." %>
@@ -1,20 +1,20 @@
-<%@user.reviews.each do |review| %>
+<%@user.reviews.each do |r| %>
<li class="review">
<div class="row">
<aside class="span2">
<span class="timestamp">
- <%= time_ago_in_words(review.created_at).capitalize%> ago.
+ <%= time_ago_in_words(r.created_at).capitalize%> ago.
</span>
<span class="del">
- <% if current_user?(review.user) || current_user.admin? %>
- <%= link_to "delete", review, method: :delete,
+ <% if current_user?(r.user) || current_user.admin? %>
+ <%= link_to "delete", r, method: :delete,
confirm: "You sure?",
- title: review.content %>
+ title: r.content %>
<% end %>
</span>
</aside>
<section>
- <span class="content"><%= review.content %></span>
+ <span class="content"><%= r.content %></span>
</section>
</div>
</li>
@@ -44,6 +44,7 @@
<% if signed_in? %>
<div class="row">
<section>
+ <% @review = @user.reviews.build() %>
<%= render 'shared/review_form' %>
</section>
</div>

0 comments on commit 7892f78

Please sign in to comment.