Class: Resizing::Rails::Video

Inherits:
ApplicationRecord show all
Defined in:
app/models/resizing/rails/video.rb

Instance Method Summary collapse

Instance Method Details

#as_json(*args) ⇒ Object



34
35
36
37
# File 'app/models/resizing/rails/video.rb', line 34

def as_json *args
  hash = super(*args)
  hash.merge(self_path: self_path)
end

#self_pathObject



30
31
32
# File 'app/models/resizing/rails/video.rb', line 30

def self_path
  Resizing::Rails.railtie_routes_url_helpers.video_path(self)
end