Class: SingleUseLink
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SingleUseLink
- Defined in:
- app/models/single_use_link.rb
Instance Method Summary collapse
Instance Method Details
#create_for_path(path) ⇒ Object
7 8 9 |
# File 'app/models/single_use_link.rb', line 7 def create_for_path(path) self.class.create(itemId: itemId, path: path) end |
#expired? ⇒ Boolean
11 12 13 |
# File 'app/models/single_use_link.rb', line 11 def expired? DateTime.current > expires end |
#to_param ⇒ Object
15 16 17 |
# File 'app/models/single_use_link.rb', line 15 def to_param downloadKey end |