From be1323ce85e2b54c35cdab8f8ea67ff9d4d39ce0 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sun, 30 Dec 2012 23:40:43 -0500 Subject: [PATCH] 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 --- app/controllers/items_controller.rb | 6 +++--- app/views/items/showcard.html.erb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index b21a21f1..9f122669 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -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 diff --git a/app/views/items/showcard.html.erb b/app/views/items/showcard.html.erb index a1d0c508..11dfe657 100644 --- a/app/views/items/showcard.html.erb +++ b/app/views/items/showcard.html.erb @@ -8,12 +8,12 @@ class="icon" height="50" width="50" />
- <%= node.name %> + <%= @item.name %>