Class: Kuhsaft::Admin::AssetsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Kuhsaft::Admin::AssetsController
- Defined in:
- app/controllers/kuhsaft/admin/assets_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/kuhsaft/admin/assets_controller.rb', line 17 def create @asset = Kuhsaft::Asset.create params[:kuhsaft_asset] @asset.save respond_with @asset, :location => admin_assets_path end |
#destroy ⇒ Object
34 35 36 37 38 |
# File 'app/controllers/kuhsaft/admin/assets_controller.rb', line 34 def destroy @asset = Kuhsaft::Asset.find(params[:id]) @asset.destroy redirect_to admin_assets_path end |
#edit ⇒ Object
23 24 25 26 |
# File 'app/controllers/kuhsaft/admin/assets_controller.rb', line 23 def edit @asset = Kuhsaft::Asset.find(params[:id]) respond_with @asset end |
#index ⇒ Object
7 8 9 10 |
# File 'app/controllers/kuhsaft/admin/assets_controller.rb', line 7 def index @assets = Kuhsaft::Asset.by_date respond_with @assets end |