Class: KktShoppe::TaxRatesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- KktShoppe::TaxRatesController
- Defined in:
- app/controllers/kkt_shoppe/tax_rates_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/controllers/kkt_shoppe/tax_rates_controller.rb', line 16 def create @tax_rate = KktShoppe::TaxRate.new(safe_params) if @tax_rate.save redirect_to :tax_rates, :flash => {:notice => t('kkt_shoppe.tax_rates.create_notice') } else render :action => "form" end end |
#destroy ⇒ Object
37 38 39 40 |
# File 'app/controllers/kkt_shoppe/tax_rates_controller.rb', line 37 def destroy @tax_rate.destroy redirect_to :tax_rates, :flash => {:notice => t('kkt_shoppe.tax_rates.destroy_notice')} end |
#edit ⇒ Object
25 26 27 |
# File 'app/controllers/kkt_shoppe/tax_rates_controller.rb', line 25 def edit render :action => "form" end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/kkt_shoppe/tax_rates_controller.rb', line 7 def index @tax_rates = KktShoppe::TaxRate.ordered.all end |
#new ⇒ Object
11 12 13 14 |
# File 'app/controllers/kkt_shoppe/tax_rates_controller.rb', line 11 def new @tax_rate = KktShoppe::TaxRate.new render :action => "form" end |
#update ⇒ Object
29 30 31 32 33 34 35 |
# File 'app/controllers/kkt_shoppe/tax_rates_controller.rb', line 29 def update if @tax_rate.update(safe_params) redirect_to [:edit, @tax_rate], :flash => {:notice => t('kkt_shoppe.tax_rates.update_notice')} else render :action => "form" end end |