def authorised? @item = Item.find(params[:id]) if @item.user != current_user flash[:error] = "You can only edit your own items!" redirect_to @item return false end end