Skip to content

Commit

Permalink
refactored test
Browse files Browse the repository at this point in the history
  • Loading branch information
olegphenomenon committed Oct 18, 2021
1 parent 6db77f4 commit 8ca83be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ def checking_username(result)
user = User.find_by(username: username)

initialize_сache_values
generate_quizzes(user)

if user.present?
p "+++++++++"
p user.present?
p user

if user.present?

generate_quizzes(user)
sign_in user
else
new_user = User.create!(
Expand All @@ -64,6 +67,7 @@ def checking_username(result)
superadmin_role: false,
)

generate_quizzes(new_user)
sign_in new_user
Rails.logger.info "#{new_user.username} sign in"
end
Expand Down
4 changes: 4 additions & 0 deletions config/initializers/rails_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def custom_label_method
visible false
end

config.model 'AnswerQuestion' do
visible false
end

config.model 'Question' do
# object_label_method do
# :custom_label_method
Expand Down

0 comments on commit 8ca83be

Please sign in to comment.