summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-27 17:54:44 -0700
committerRobert Speicher <rspeicher@gmail.com>2015-05-09 17:31:10 -0400
commit50a2a229e7b8b789a199bd0cf84ce76d25201198 (patch)
tree6dcac7385d9fe4fa7ff2b6b4a30cd768afdba907
parentcde474a49f0ff44350d813aba83b6880df960f15 (diff)
downloadgitlab-ce-50a2a229e7b8b789a199bd0cf84ce76d25201198.tar.gz
Fix rubocop complain
-rw-r--r--app/controllers/profiles/two_factor_auths_controller.rb1
-rw-r--r--app/models/user.rb2
-rw-r--r--config/initializers/devise.rb2
3 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb
index ac14d5ca75b..9b4070a76f7 100644
--- a/app/controllers/profiles/two_factor_auths_controller.rb
+++ b/app/controllers/profiles/two_factor_auths_controller.rb
@@ -11,7 +11,6 @@ class Profiles::TwoFactorAuthsController < ApplicationController
def create
if current_user.valid_otp?(params[:pin_code])
current_user.otp_required_for_login = true
- #current_user.otp_secret = User.generate_otp_secret
current_user.save!
redirect_to profile_account_path
diff --git a/app/models/user.rb b/app/models/user.rb
index b9e28900187..befbcbf1a16 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -58,7 +58,7 @@ require 'file_size_validator'
class User < ActiveRecord::Base
devise :two_factor_authenticatable,
- :otp_secret_encryption_key => File.read(Rails.root.join('.secret')).chomp
+ otp_secret_encryption_key: File.read(Rails.root.join('.secret')).chomp
include Sortable
include Gitlab::ConfigHelper
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 956bb048b2a..c003a7102a5 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -2,7 +2,7 @@
# four configuration values can also be set straight in your models.
Devise.setup do |config|
config.warden do |manager|
- manager.default_strategies(:scope => :user).unshift :two_factor_authenticatable
+ manager.default_strategies(scope: :user).unshift :two_factor_authenticatable
end
# ==> Mailer Configuration