Class: Kuhsaft::Cms::AssetsController
- Inherits:
-
AdminController
- Object
- ActionController::Base
- ApplicationController
- AdminController
- Kuhsaft::Cms::AssetsController
- Defined in:
- app/controllers/kuhsaft/cms/assets_controller.rb
Instance Method Summary collapse
Methods inherited from AdminController
Instance Method Details
#create ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/kuhsaft/cms/assets_controller.rb', line 14 def create @asset = Kuhsaft::Asset.create params[:kuhsaft_asset] @asset.save respond_with @asset, :location => cms_assets_path end |
#destroy ⇒ Object
31 32 33 34 35 |
# File 'app/controllers/kuhsaft/cms/assets_controller.rb', line 31 def destroy @asset = Kuhsaft::Asset.find(params[:id]) @asset.destroy redirect_to cms_assets_path end |
#edit ⇒ Object
20 21 22 23 |
# File 'app/controllers/kuhsaft/cms/assets_controller.rb', line 20 def edit @asset = Kuhsaft::Asset.find(params[:id]) respond_with @asset end |
#index ⇒ Object
4 5 6 7 |
# File 'app/controllers/kuhsaft/cms/assets_controller.rb', line 4 def index @assets = Kuhsaft::Asset.by_date respond_with @assets end |