Class: ActiveStix::IntrusionSetsController

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

Instance Method Summary collapse

Instance Method Details

#createObject

POST /intrusion_sets



26
27
28
29
30
31
32
33
34
# File 'app/controllers/active_stix/intrusion_sets_controller.rb', line 26

def create
  @intrusion_set = IntrusionSet.new(intrusion_set_params)

  if @intrusion_set.save
    redirect_to @intrusion_set, notice: 'Intrusion set was successfully created.'
  else
    render :new
  end
end

#destroyObject

DELETE /intrusion_sets/1



46
47
48
49
# File 'app/controllers/active_stix/intrusion_sets_controller.rb', line 46

def destroy
  @intrusion_set.destroy
  redirect_to intrusion_sets_url, notice: 'Intrusion set was successfully destroyed.'
end

#editObject

GET /intrusion_sets/1/edit



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

def edit
end

#indexObject

GET /intrusion_sets



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

def index
  @intrusion_sets = IntrusionSet.all
end

#newObject

GET /intrusion_sets/new



17
18
19
# File 'app/controllers/active_stix/intrusion_sets_controller.rb', line 17

def new
  @intrusion_set = IntrusionSet.new
end

#showObject

GET /intrusion_sets/1



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

def show
end

#updateObject

PATCH/PUT /intrusion_sets/1



37
38
39
40
41
42
43
# File 'app/controllers/active_stix/intrusion_sets_controller.rb', line 37

def update
  if @intrusion_set.update(intrusion_set_params)
    redirect_to @intrusion_set, notice: 'Intrusion set was successfully updated.'
  else
    render :edit
  end
end