Module: Voltron::Encryptable
- Defined in:
- lib/voltron/encryptable.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Instance Method Summary
collapse
Instance Method Details
#encrypted_id ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/voltron/encryptable.rb', line 8
def encrypted_id
extend ClassMethods
include InstanceMethods
has_one :encryptable, as: :resource, class_name: "Voltron::Id"
before_save -> (i) { i.build_encryptable(id: find_id) }, if: proc { |i| i.encryptable.blank? }
end
|
#has_encrypted_id? ⇒ Boolean
4
5
6
|
# File 'lib/voltron/encryptable.rb', line 4
def has_encrypted_id?
false
end
|