Class: Distribuo::Apps::ReleasesController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/distribuo/apps/releases_controller.rb

Overview

FIXME: This should probably inherit from an ApplicatoinController

Instance Method Summary collapse

Instance Method Details

#downloadObject



10
11
12
13
14
15
16
17
18
# File 'app/controllers/distribuo/apps/releases_controller.rb', line 10

def download
  if request.get?
    @release.downloads.create(ip: request.ip)
    send_data @release.build.download, filename: @release.build.filename.to_s,
                                       content_type: @release.build.content_type
  else
    head 204
  end
end

#manifestObject



20
21
22
# File 'app/controllers/distribuo/apps/releases_controller.rb', line 20

def manifest
  render plist: 'manifest.plist.erb'
end