Class: Abrasf::Desif::CityTaxCodesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/abrasf/desif/city_tax_codes_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /city_tax_codes



28
29
30
31
32
33
34
35
36
# File 'app/controllers/abrasf/desif/city_tax_codes_controller.rb', line 28

def create
  @city_tax_code = CityTaxCode.new(city_tax_code_params)

  if @city_tax_code.save
    redirect_to @city_tax_code, notice: t('.created')
  else
    render :new
  end
end

#destroyObject

DELETE /city_tax_codes/1



48
49
50
51
# File 'app/controllers/abrasf/desif/city_tax_codes_controller.rb', line 48

def destroy
  @city_tax_code.destroy
  redirect_to city_tax_codes_url, notice: t('.destroyed')
end

#editObject

GET /city_tax_codes/1/edit



24
25
# File 'app/controllers/abrasf/desif/city_tax_codes_controller.rb', line 24

def edit
end

#indexObject

GET /city_tax_codes



10
11
12
# File 'app/controllers/abrasf/desif/city_tax_codes_controller.rb', line 10

def index
  @city_tax_codes = CityTaxCode.all
end

#newObject

GET /city_tax_codes/new



19
20
21
# File 'app/controllers/abrasf/desif/city_tax_codes_controller.rb', line 19

def new
  @city_tax_code = CityTaxCode.new
end

#showObject

GET /city_tax_codes/1



15
16
# File 'app/controllers/abrasf/desif/city_tax_codes_controller.rb', line 15

def show
end

#updateObject

PATCH/PUT /city_tax_codes/1



39
40
41
42
43
44
45
# File 'app/controllers/abrasf/desif/city_tax_codes_controller.rb', line 39

def update
  if @city_tax_code.update(city_tax_code_params)
    redirect_to @city_tax_code, notice: t('.updated')
  else
    render :edit
  end
end