Sha256: a96a4e669dcbad881081700184add949f44d245d74a51acf3f784ce37bc5527d

Contents?: true

Size: 682 Bytes

Versions: 6

Compression:

Stored size: 682 Bytes

Contents

module Locomotive
  module Api
    class ContentAssetsController < BaseController

      def index
        @content_assets = current_site.content_assets
        respond_with(@content_assets)
      end

      def create
        @content_asset = current_site.content_assets.create(params[:content_asset])
        respond_with @content_asset, :location => main_app.locomotive_api_content_assets_url
      end

      def update
        @content_asset = current_site.content_assets.find(params[:id])
        @content_asset.update_attributes(params[:content_asset])
        respond_with @content_asset, :location => main_app.locomotive_api_content_assets_url
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc7 app/controllers/locomotive/api/content_assets_controller.rb
locomotive_cms-2.0.0.rc6 app/controllers/locomotive/api/content_assets_controller.rb
locomotive_cms-2.0.0.rc5 app/controllers/locomotive/api/content_assets_controller.rb
locomotive_cms-2.0.0.rc4 app/controllers/locomotive/api/content_assets_controller.rb
locomotive_cms-2.0.0.rc2 app/controllers/locomotive/api/content_assets_controller.rb
locomotive_cms-2.0.0.rc1 app/controllers/locomotive/api/content_assets_controller.rb