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:
parent
ae95cbf6f4
commit
be1323ce85
2 changed files with 6 additions and 6 deletions
|
@ -49,11 +49,11 @@ class ItemsController < ApplicationController
|
|||
|
||||
# GET showcard/:id
|
||||
def showcard
|
||||
@current = current_user
|
||||
@item = Item.find(params[:id]).authorize_to_show(@current)
|
||||
@user = current_user
|
||||
@item = Item.find(params[:id]).authorize_to_show(@user)
|
||||
|
||||
respond_to do |format|
|
||||
format.json { respond_with(@item) }
|
||||
format.html { respond_with(@item, @user) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
class="icon" height="50" width="50" />
|
||||
<div class="scroll">
|
||||
<a href="/items/<%=@item.id%>" class="title">
|
||||
<%= node.name %>
|
||||
<%= @item.name %>
|
||||
</a>
|
||||
<div class="contributor">
|
||||
Added by:
|
||||
<a href="/users/<%= @item.user_id%>">
|
||||
<%= User.all.find(@item.user_id).name %>
|
||||
<a href="/users/<%= @user.id %>">
|
||||
<%= @user.name %>
|
||||
</a>
|
||||
</div>
|
||||
<div class="desc">
|
||||
|
|
Loading…
Reference in a new issue