mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove useless begin..end
This commit is contained in:
parent
6bbbe0b651
commit
70c83f49f8
1 changed files with 1 additions and 2 deletions
|
@ -151,14 +151,13 @@ module Rails
|
|||
def key_generator
|
||||
# number of iterations selected based on consultation with the google security
|
||||
# team. Details at https://github.com/rails/rails/pull/6952#issuecomment-7661220
|
||||
@caching_key_generator ||= begin
|
||||
@caching_key_generator ||=
|
||||
if secrets.secret_key_base
|
||||
key_generator = ActiveSupport::KeyGenerator.new(secrets.secret_key_base, iterations: 1000)
|
||||
ActiveSupport::CachingKeyGenerator.new(key_generator)
|
||||
else
|
||||
ActiveSupport::LegacyKeyGenerator.new(config.secret_token)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Returns a message verifier object.
|
||||
|
|
Loading…
Reference in a new issue