Sha256: 4415ef34c847b0beff269535d2f13a1eba6e4248346f9427cd5803bb9dff5051

Contents?: true

Size: 899 Bytes

Versions: 72

Compression:

Stored size: 899 Bytes

Contents

module Kuhsaft
  module Cms
    class AssetsController < AdminController
      def index
        @assets = Kuhsaft::Asset.by_date
        respond_with @assets
      end
    
      def new
        @asset = Kuhsaft::Asset.new
        respond_with @asset
      end
    
      def create
        @asset = Kuhsaft::Asset.create params[:kuhsaft_asset]
        @asset.save
        respond_with @asset, :location => cms_assets_path
      end
    
      def edit
        @asset = Kuhsaft::Asset.find(params[:id])
        respond_with @asset
      end
    
      def update
        @asset = Kuhsaft::Asset.find(params[:id])
        @asset.update_attributes(params[:kuhsaft_asset])
        respond_with @asset, :location => cms_assets_path
      end
    
      def destroy
        @asset = Kuhsaft::Asset.find(params[:id])
        @asset.destroy
        redirect_to cms_assets_path
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
kuhsaft-2.0.2 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.8.4 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.8.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.0.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.0.0 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.8.0 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.7.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.7.0 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.6.0 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.5.0 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.4.3 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.4.2 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.4.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.4.0 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.3.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-0.3.6 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-0.3.5 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.2.15 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.2.14 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-1.2.13 app/controllers/kuhsaft/cms/assets_controller.rb