Class: Rusic::Uploaders::EditableAsset

Inherits:
Base
  • Object
show all
Defined in:
lib/rusic/uploaders/editable_asset.rb

Instance Attribute Summary

Attributes inherited from Base

#api_host, #api_key, #file, #theme

Instance Method Summary collapse

Methods inherited from Base

#initialize, #upload_file

Constructor Details

This class inherits a constructor from Rusic::Uploaders::Base

Instance Method Details

#performObject



4
5
6
7
8
9
10
11
# File 'lib/rusic/uploaders/editable_asset.rb', line 4

def perform
  case file.extname
  when '.css'
    client["themes/#{theme}/stylesheets/#{file.filename}"].put(params)
  when '.js'
    client["themes/#{theme}/javascripts/#{file.filename}"].put(params)
  end
end