Class: ActiveStix::OpenVocabulariesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/active_stix/open_vocabularies_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

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

#destroyObject

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

#editObject

GET /open_vocabularies/1/edit



22
23
# File 'app/controllers/active_stix/open_vocabularies_controller.rb', line 22

def edit
end

#indexObject

GET /open_vocabularies



8
9
10
# File 'app/controllers/active_stix/open_vocabularies_controller.rb', line 8

def index
  @open_vocabularies = OpenVocabulary.all
end

#newObject

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

#showObject

GET /open_vocabularies/1



13
14
# File 'app/controllers/active_stix/open_vocabularies_controller.rb', line 13

def show
end

#updateObject

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