Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
More removing
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwebb76 committed Dec 12, 2023
1 parent b2d12fe commit 58edc2a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
10 changes: 1 addition & 9 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 0 additions & 6 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def clean_database
Prediction.delete_all
Judgement.delete_all
Response.delete_all
DeadlineNotification.delete_all
end

def random_future_day
Expand Down Expand Up @@ -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."

0 comments on commit 58edc2a

Please sign in to comment.