Sha256: 9c79aa17ac51aabd8e65c4561c9e65778fb3e38b98492ead7534a581a0db823c
Contents?: true
Size: 1010 Bytes
Versions: 5
Compression:
Stored size: 1010 Bytes
Contents
module Locomotive module Api class ThemeAssetsController < BaseController load_and_authorize_resource :class => Locomotive::ThemeAsset def index @theme_assets = current_site.theme_assets.all respond_with(@theme_assets) end def show @theme_asset = current_site.theme_assets.find(params[:id]) respond_with @theme_asset end def create @theme_asset = current_site.theme_assets.create(params[:theme_asset]) respond_with @theme_asset, :location => main_app.locomotive_api_theme_assets_url end def update @theme_asset = current_site.theme_assets.find(params[:id]) @theme_asset.update_attributes(params[:theme_asset]) respond_with @theme_asset, :location => main_app.locomotive_api_theme_assets_url end def destroy @theme_asset = current_site.theme_assets.find(params[:id]) @theme_asset.destroy respond_with @theme_asset end end end end
Version data entries
5 entries across 5 versions & 1 rubygems