got some hacky way of having the showcard show up on the page. TODO: figure out how to drop the application.html wrapper stuff and how to get this into Javascript

This commit is contained in:
Devin Howard 2012-12-30 23:40:43 -05:00
parent ae95cbf6f4
commit be1323ce85
2 changed files with 6 additions and 6 deletions

View file

@ -49,11 +49,11 @@ class ItemsController < ApplicationController
# GET showcard/:id # GET showcard/:id
def showcard def showcard
@current = current_user @user = current_user
@item = Item.find(params[:id]).authorize_to_show(@current) @item = Item.find(params[:id]).authorize_to_show(@user)
respond_to do |format| respond_to do |format|
format.json { respond_with(@item) } format.html { respond_with(@item, @user) }
end end
end end

View file

@ -8,12 +8,12 @@
class="icon" height="50" width="50" /> class="icon" height="50" width="50" />
<div class="scroll"> <div class="scroll">
<a href="/items/<%=@item.id%>" class="title"> <a href="/items/<%=@item.id%>" class="title">
<%= node.name %> <%= @item.name %>
</a> </a>
<div class="contributor"> <div class="contributor">
Added by: Added by:
<a href="/users/<%= @item.user_id%>"> <a href="/users/<%= @user.id %>">
<%= User.all.find(@item.user_id).name %> <%= @user.name %>
</a> </a>
</div> </div>
<div class="desc"> <div class="desc">