Class: ForgotPasswordToken

Inherits:
SecureToken
  • Object
show all
Defined in:
app/models/user/forgot_password_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#user_idObject

Returns the value of attribute user_id.



4
5
6
# File 'app/models/user/forgot_password_token.rb', line 4

def user_id
  @user_id
end

Instance Method Details

#userObject



5
6
7
# File 'app/models/user/forgot_password_token.rb', line 5

def user
  _cache[:user] ||= User.by_id user_id
end

#user=(user) ⇒ Object



8
9
10
11
# File 'app/models/user/forgot_password_token.rb', line 8

def user= user
  _cache[:user] = user
  self.user_id = user._id
end