Class: ClassificationsController
- Inherits:
-
FassetsCore::ApplicationController
- Object
- ActionController::Base
- FassetsCore::ApplicationController
- ClassificationsController
- Defined in:
- app/controllers/classifications_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/classifications_controller.rb', line 7 def create if params[:asset_id] @classification = Classification.new(:asset_id => params[:asset_id],:catalog_id => params[:catalog_id]) @classification.save create_content_labeling(params[:asset_id],params[:catalog_id]) else classification = Classification.new(params[:classification]) classification.save end render :nothing => true end |
#destroy ⇒ Object
18 19 20 21 |
# File 'app/controllers/classifications_controller.rb', line 18 def destroy @classification.destroy render :nothing => true end |
#update ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/classifications_controller.rb', line 22 def update if params[:commit] == "Drop" @classification.destroy() return end @classification.label_ids = params[:labels] flash[:notice] = "Updated Classification" respond_with do |format| format.js format.html {} end end |