Skip to content

Commit

Permalink
Make confirmable not dependant on trackable (lynndylanhurley#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
romankovt authored and zachfeldman committed Jan 12, 2018
1 parent e8f49ac commit d71c054
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def show
token_hash = BCrypt::Password.create(token)
expiry = (Time.now + @resource.token_lifespan).to_i

if @resource.sign_in_count > 0
if defined? @resource.sign_in_count && @resource.sign_in_count > 0
expiry = (Time.now + 1.second).to_i
end

Expand Down

0 comments on commit d71c054

Please sign in to comment.