Class: SolidEvents::SavedViewsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SolidEvents::SavedViewsController
- Defined in:
- app/controllers/solid_events/saved_views_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/solid_events/saved_views_controller.rb', line 5 def create SolidEvents::SavedView.create!( name: params[:name].to_s.strip, filters: filters_payload, created_by: params[:created_by].to_s.presence ) redirect_to traces_path, notice: "Saved view created." rescue StandardError => e redirect_to traces_path, alert: "Could not save view: #{e.message}" end |
#destroy ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/controllers/solid_events/saved_views_controller.rb', line 16 def destroy saved_view = SolidEvents::SavedView.find(params[:id]) saved_view.destroy! redirect_to traces_path, notice: "Saved view removed." rescue StandardError => e redirect_to traces_path, alert: "Could not remove view: #{e.message}" end |