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