diff --git a/Gemfile.lock b/Gemfile.lock index c2a4236..2460d82 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,9 +147,8 @@ GEM rest-client (1.7.2) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rubocop (0.24.1) - json (>= 1.7.7, < 2) - parser (>= 2.2.0.pre.3, < 3.0) + rubocop (0.25.0) + parser (>= 2.2.0.pre.4, < 3.0) powerpack (~> 0.0.6) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.4) diff --git a/app/controllers/info_window_controller.rb b/app/controllers/info_window_controller.rb index d6b6bf6..15be9f2 100644 --- a/app/controllers/info_window_controller.rb +++ b/app/controllers/info_window_controller.rb @@ -1,18 +1,11 @@ class InfoWindowController < ApplicationController def index @thing = Thing.find_by_id(params[:thing_id]) - if @thing.adopted? - if user_signed_in? && current_user == @thing.user - render('users/thank_you') - else - render('users/profile') - end + view = if @thing.adopted? + user_signed_in? && current_user == @thing.user ? 'users/thank_you' : 'users/profile' else - if user_signed_in? - render('things/adopt') - else - render('users/sign_in') - end + user_signed_in? ? 'things/adopt' : 'users/sign_in' end + render view end end