2012-01-23 08:05:50 +00:00
|
|
|
module Locomotive
|
|
|
|
module Api
|
|
|
|
class ThemeAssetsController < BaseController
|
|
|
|
|
|
|
|
def index
|
|
|
|
@theme_assets = current_site.theme_assets.all
|
|
|
|
respond_with(@theme_assets)
|
|
|
|
end
|
|
|
|
|
|
|
|
def create
|
|
|
|
@theme_asset = current_site.theme_assets.create(params[:theme_asset])
|
2012-01-24 20:16:53 +00:00
|
|
|
respond_with @theme_asset, :location => edit_locomotive_api_theme_asset_url(@theme_asset._id)
|
2012-01-23 08:05:50 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def update
|
|
|
|
@theme_asset = current_site.theme_assets.find(params[:id])
|
|
|
|
@theme_asset.update_attributes(params[:theme_asset])
|
2012-01-24 20:16:53 +00:00
|
|
|
respond_with @theme_asset, :location => edit_locomotive_api_theme_asset_url(@theme_asset._id)
|
2012-01-23 08:05:50 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|