Class: Forge::TaxRatesController
Instance Method Summary
collapse
#get_menu_items, #load_help, #set_crumbs, #set_title, #uses_ckeditor
#app_init
Instance Method Details
#create ⇒ Object
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/forge/app/controllers/forge/tax_rates_controller.rb', line 15
def create
@tax_rate = TaxRate.new(params[:tax_rate])
if @tax_rate.save
flash[:notice] = 'Tax rate was successfully created.'
redirect_to(forge_tax_rates_path)
else
get_tax_rates
render :action => "index"
end
end
|
#destroy ⇒ Object
35
36
37
38
|
# File 'lib/forge/app/controllers/forge/tax_rates_controller.rb', line 35
def destroy
@tax_rate.destroy
redirect_to(forge_tax_rates_path)
end
|
#edit ⇒ Object
11
12
13
|
# File 'lib/forge/app/controllers/forge/tax_rates_controller.rb', line 11
def edit
render :layout => false
end
|
#index ⇒ Object
4
5
6
7
8
9
|
# File 'lib/forge/app/controllers/forge/tax_rates_controller.rb', line 4
def index
@tax_rate = TaxRate.new
respond_to do |format|
format.html { get_tax_rates }
end
end
|
#update ⇒ Object
26
27
28
29
30
31
32
33
|
# File 'lib/forge/app/controllers/forge/tax_rates_controller.rb', line 26
def update
if @tax_rate.update_attributes(params[:tax_rate])
flash[:notice] = 'Tax rate was successfully updated.'
redirect_to(forge_tax_rates_path)
else
render :action => "edit"
end
end
|