fixed bug where wasn't setting person location on create. updated so that items don't change users when they're edited by someone else.

This commit is contained in:
Connor Turland 2012-10-03 21:54:21 -04:00
parent f08f5835ec
commit a7d89bf798
2 changed files with 3 additions and 2 deletions

View file

@ -89,7 +89,6 @@ class ItemsController < ApplicationController
# PUT /actions/:id
def update
@user = current_user
@item = Item.find_by_id(params[:id])
if @item
@ -97,7 +96,6 @@ class ItemsController < ApplicationController
@item.desc = params[:item][:desc]
@item.link = params[:item][:link]
@item.item_category = ItemCategory.find(params[:category][:item_category_id])
@item.user = @user
@item.save
end

View file

@ -38,6 +38,9 @@ class PeopleController < ApplicationController
@person.name = params[:person][:name]
@person.desc = params[:person][:desc]
@person.link = params[:person][:link]
@person.city = params[:person][:city]
@person.province = params[:person][:province]
@person.country = params[:person][:country]
@person.user = @user
@person.save