diff --git a/app/controllers/info_window_controller.rb b/app/controllers/info_window_controller.rb index 068421f..293d34a 100644 --- a/app/controllers/info_window_controller.rb +++ b/app/controllers/info_window_controller.rb @@ -2,7 +2,7 @@ class InfoWindowController < ApplicationController def index @thing = Thing.find_by_id(params[:thing_id]) if @thing.adopted? - if user_signed_in? && current_user.id == @thing.user_id + if user_signed_in? && current_user == @thing.user render("users/thank_you") else render("users/profile") diff --git a/app/models/thing.rb b/app/models/thing.rb index c42b2b6..9b33d76 100644 --- a/app/models/thing.rb +++ b/app/models/thing.rb @@ -57,6 +57,6 @@ class Thing < ActiveRecord::Base end def adopted? - !user_id.nil? + !user.nil? end end