Module: EncryptedId::InstanceMethods
- Defined in:
- lib/encrypted_id.rb
Instance Method Summary collapse
Instance Method Details
#reload(options = nil) ⇒ Object
69 70 71 72 |
# File 'lib/encrypted_id.rb', line 69 def reload( = nil) = ( || {}).merge(:no_encrypted_id => true) super() end |
#to_key ⇒ Object
61 62 63 64 65 66 67 |
# File 'lib/encrypted_id.rb', line 61 def to_key key = self.id or nil if key key = [EncryptedId.encrypt(self.class.encrypted_id_key, self.id)] end key end |
#to_param ⇒ Object
57 58 59 |
# File 'lib/encrypted_id.rb', line 57 def to_param EncryptedId.encrypt(self.class.encrypted_id_key, self.id) end |