fixed add topic bug, wasn't adding topics when on pages other than maps.

This commit is contained in:
Connor Turland 2012-10-31 00:25:56 -04:00
parent c7dfd836f1
commit 69b2fe87cc

View file

@ -46,8 +46,17 @@ class ItemsController < ApplicationController
@user = current_user
if params[:initem] != ""
@item = Item.find(params[:initem])
@addtomap = false
if params[:initem]
if params[:initem] != ""
@addtomap = true
@itemid = params[:initem]
end
end
if @addtomap
@item = Item.find(@itemid)
else
@item = Item.new()
@item.name = params[:item][:name]