Module: ChromembedRails::Controller

Included in:
ChromeExtensionController
Defined in:
lib/chromembed_rails/controller.rb

Overview

Included in the Chrome extension serving controller.

Some parts of the codebase assume that the controller’s name is ChromeExtension.

Instance Method Summary collapse

Instance Method Details

#showObject

GET /chrome_extension.crx



13
14
15
16
17
18
# File 'lib/chromembed_rails/controller.rb', line 13

def show
  extension_data =
      ChromeExtensionCache.extension_data(chrome_extension_update_url)
  send_data extension_data.crx_bits, :disposition => 'attachment',
      :content_type => 'application/x-chrome-extension'
end

#updateObject

GET /chrome_extension/update.xml



21
22
23
24
25
# File 'lib/chromembed_rails/controller.rb', line 21

def update
  extension_data =
      ChromeExtensionCache.extension_data(chrome_extension_update_url)
  render :text => update_xml(extension_data)
end