Sha256: fda864cc49cb918f1ff71a8e354f2575b282a39aa4f89443834160064c9d593b

Contents?: true

Size: 873 Bytes

Versions: 19

Compression:

Stored size: 873 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

19 entries across 19 versions & 2 rubygems

Version Path
kuhsaft-2.6.3 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.6.2 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.6.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.5.2 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.6.0 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.5.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.5.0 app/controllers/kuhsaft/cms/assets_controller.rb
qbrick-2.5.0.pre app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.4.3 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.4.2 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.4.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.4.0 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.3.6 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.3.5 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.3.4 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.3.3 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.3.2 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.3.1 app/controllers/kuhsaft/cms/assets_controller.rb
kuhsaft-2.3.0 app/controllers/kuhsaft/cms/assets_controller.rb