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