Module: GlobalID::Identification
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/global_id/identification.rb
Instance Method Summary collapse
- #to_gid_param(options = {}) ⇒ Object
- #to_global_id(options = {}) ⇒ Object (also: #to_gid)
- #to_sgid_param(options = {}) ⇒ Object
- #to_signed_global_id(options = {}) ⇒ Object (also: #to_sgid)
Instance Method Details
#to_gid_param(options = {}) ⇒ Object
12 13 14 |
# File 'lib/global_id/identification.rb', line 12 def to_gid_param( = {}) to_global_id().to_param end |
#to_global_id(options = {}) ⇒ Object Also known as: to_gid
7 8 9 |
# File 'lib/global_id/identification.rb', line 7 def to_global_id( = {}) @global_id ||= GlobalID.create(self, ) end |
#to_sgid_param(options = {}) ⇒ Object
21 22 23 |
# File 'lib/global_id/identification.rb', line 21 def to_sgid_param( = {}) to_signed_global_id().to_param end |
#to_signed_global_id(options = {}) ⇒ Object Also known as: to_sgid
16 17 18 |
# File 'lib/global_id/identification.rb', line 16 def to_signed_global_id( = {}) SignedGlobalID.create(self, ) end |