Sha256: ce4bbaa2e5d0a3d0b5189d0a13931aa9c71f70d257032150e8afe6cee4a2d83e

Contents?: true

Size: 866 Bytes

Versions: 16

Compression:

Stored size: 866 Bytes

Contents

module Qbrick
  module Cms
    class AssetsController < BackendController
      def index
        @assets = Qbrick::Asset.by_date
        respond_with @assets
      end

      def new
        @asset = Qbrick::Asset.new
        respond_with @asset
      end

      def create
        @asset = Qbrick::Asset.create params[:qbrick_asset]
        @asset.save
        respond_with @asset, location: cms_assets_path
      end

      def edit
        @asset = Qbrick::Asset.find(params[:id])
        respond_with @asset
      end

      def update
        @asset = Qbrick::Asset.find(params[:id])
        @asset.update_attributes(params[:qbrick_asset])
        respond_with @asset, location: cms_assets_path
      end

      def destroy
        @asset = Qbrick::Asset.find(params[:id])
        @asset.destroy
        redirect_to cms_assets_path
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
qbrick-2.7.1 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.7 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.10 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.9 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.8 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.7 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.6 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.5 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.4 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.3 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.2 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.1 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.6.0 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.5.2 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.5.1 app/controllers/qbrick/cms/assets_controller.rb
qbrick-2.5.0 app/controllers/qbrick/cms/assets_controller.rb