Class: BranchLinesController

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

Overview

Class controller for Branch Lines from the Sections

Instance Method Summary collapse

Methods inherited from ApplicationController

#default_url_options, #set_locale

Instance Method Details

#createObject

POST /branch_lines


24
25
26
27
28
29
30
31
32
33
# File 'app/controllers/branch_lines_controller.rb', line 24

def create
  @branch_line = BranchLine.new(branch_line_params)
  respond_to do |format|
    if @branch_line.save
      format.html { redirect_to @branch_line, notice: t('.created') }
    else
      format.html { render :new }
    end
  end
end

#destroyObject

DELETE /branch_lines/1


47
48
49
50
51
52
# File 'app/controllers/branch_lines_controller.rb', line 47

def destroy
  @branch_line.destroy
  respond_to do |format|
    format.html { redirect_to branch_lines_url, notice: t('.destroied') }
  end
end

#editObject

GET /branch_lines/1/edit


20
21
# File 'app/controllers/branch_lines_controller.rb', line 20

def edit
end

#indexObject

GET /branch_lines


6
7
8
# File 'app/controllers/branch_lines_controller.rb', line 6

def index
  @branch_lines = BranchLine.all
end

#newObject

GET /branch_lines/new


15
16
17
# File 'app/controllers/branch_lines_controller.rb', line 15

def new
  @branch_line = BranchLine.new
end

#showObject

GET /branch_lines/1


11
12
# File 'app/controllers/branch_lines_controller.rb', line 11

def show
end

#updateObject

PATCH/PUT /branch_lines/1


36
37
38
39
40
41
42
43
44
# File 'app/controllers/branch_lines_controller.rb', line 36

def update
  respond_to do |format|
    if @branch_line.update(branch_line_params)
      format.html { redirect_to @branch_line, notice: t('.updated') }
    else
      format.html { render :edit }
    end
  end
end