Class: ActiveStix::BccRefsController

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

Instance Method Summary collapse

Instance Method Details

#createObject

POST /bcc_refs



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

def create
  @bcc_ref = BccRef.new(bcc_ref_params)

  if @bcc_ref.save
    redirect_to @bcc_ref, notice: 'Bcc ref was successfully created.'
  else
    render :new
  end
end

#destroyObject

DELETE /bcc_refs/1



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

def destroy
  @bcc_ref.destroy
  redirect_to bcc_refs_url, notice: 'Bcc ref was successfully destroyed.'
end

#editObject

GET /bcc_refs/1/edit



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

def edit
end

#indexObject

GET /bcc_refs



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

def index
  @bcc_refs = BccRef.all
end

#newObject

GET /bcc_refs/new



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

def new
  @bcc_ref = BccRef.new
end

#showObject

GET /bcc_refs/1



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

def show
end

#updateObject

PATCH/PUT /bcc_refs/1



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

def update
  if @bcc_ref.update(bcc_ref_params)
    redirect_to @bcc_ref, notice: 'Bcc ref was successfully updated.'
  else
    render :edit
  end
end