diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c7525435..ec231f43 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -10,7 +10,7 @@ class UnauthorizedRequest < StandardError helper :all # include all helpers, all the time - before_action :set_timezone, :clear_return_to, :login_via_token + before_action :set_timezone, :clear_return_to before_action :configure_permitted_parameters, if: :devise_controller? protect_from_forgery with: :exception, prepend: true @@ -34,12 +34,4 @@ def set_timezone def clear_return_to session[:return_to] = nil end - - def login_via_token - token = params[:token] - if token.present? - DeadlineNotification.use_token!(token) { |dn| @current_user = dn.user } - redirect_to # get rid of token in url so if it is copied and pasted it's not propagated - end - end end diff --git a/db/seeds.rb b/db/seeds.rb index 3c18d7ad..90527c01 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -11,7 +11,6 @@ def clean_database Prediction.delete_all Judgement.delete_all Response.delete_all - DeadlineNotification.delete_all end def random_future_day @@ -127,10 +126,5 @@ def random_int finish_time = Time.current -puts 'creating credence questions and answers' -CredenceQuestionGenerator - .new('db/questions/OfficialCfarQuestions.xml', quiet: true) - .call - puts 'END SEEDING' puts "Seeding the database took #{finish_time - start_time} seconds."