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