Class: ActiveStix::CyberObservablesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ActiveStix::CyberObservablesController
- Defined in:
- app/controllers/active_stix/cyber_observables_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /cyber_observables.
-
#destroy ⇒ Object
DELETE /cyber_observables/1.
-
#edit ⇒ Object
GET /cyber_observables/1/edit.
-
#index ⇒ Object
GET /cyber_observables.
-
#new ⇒ Object
GET /cyber_observables/new.
-
#show ⇒ Object
GET /cyber_observables/1.
-
#update ⇒ Object
PATCH/PUT /cyber_observables/1.
Instance Method Details
#create ⇒ Object
POST /cyber_observables
26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/active_stix/cyber_observables_controller.rb', line 26 def create @cyber_observable = CyberObservable.new(cyber_observable_params) if @cyber_observable.save redirect_to @cyber_observable, notice: 'Cyber observable was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /cyber_observables/1
46 47 48 49 |
# File 'app/controllers/active_stix/cyber_observables_controller.rb', line 46 def destroy @cyber_observable.destroy redirect_to cyber_observables_url, notice: 'Cyber observable was successfully destroyed.' end |
#edit ⇒ Object
GET /cyber_observables/1/edit
22 23 |
# File 'app/controllers/active_stix/cyber_observables_controller.rb', line 22 def edit end |
#index ⇒ Object
GET /cyber_observables
8 9 10 |
# File 'app/controllers/active_stix/cyber_observables_controller.rb', line 8 def index @cyber_observables = CyberObservable.all end |
#new ⇒ Object
GET /cyber_observables/new
17 18 19 |
# File 'app/controllers/active_stix/cyber_observables_controller.rb', line 17 def new @cyber_observable = CyberObservable.new end |
#show ⇒ Object
GET /cyber_observables/1
13 14 |
# File 'app/controllers/active_stix/cyber_observables_controller.rb', line 13 def show end |
#update ⇒ Object
PATCH/PUT /cyber_observables/1
37 38 39 40 41 42 43 |
# File 'app/controllers/active_stix/cyber_observables_controller.rb', line 37 def update if @cyber_observable.update(cyber_observable_params) redirect_to @cyber_observable, notice: 'Cyber observable was successfully updated.' else render :edit end end |