Class: Workarea::Admin::TaxCategoriesController
Instance Method Summary
collapse
#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model
Methods included from Publishing
#allow_publishing!, #allow_publishing?, #set_publishing_options
Methods included from Visiting
#most_visited
Instance Method Details
#create ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'app/controllers/workarea/admin/tax_categories_controller.rb', line 18
def create
if @category.save
flash[:success] = t('workarea.admin.tax_categories.flash_messages.created')
redirect_to tax_category_path(@category)
else
render :new
end
end
|
#destroy ⇒ Object
36
37
38
39
40
|
# File 'app/controllers/workarea/admin/tax_categories_controller.rb', line 36
def destroy
@category.destroy
flash[:success] = t('workarea.admin.tax_categories.flash_messages.removed')
redirect_to tax_categories_path
end
|
#edit ⇒ Object
16
|
# File 'app/controllers/workarea/admin/tax_categories_controller.rb', line 16
def edit; end
|
#index ⇒ Object
7
8
9
|
# File 'app/controllers/workarea/admin/tax_categories_controller.rb', line 7
def index
@categories = Tax::Category.all
end
|
#new ⇒ Object
14
|
# File 'app/controllers/workarea/admin/tax_categories_controller.rb', line 14
def new; end
|
#show ⇒ Object
11
12
|
# File 'app/controllers/workarea/admin/tax_categories_controller.rb', line 11
def show
end
|
#update ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'app/controllers/workarea/admin/tax_categories_controller.rb', line 27
def update
if @category.update_attributes(params[:category])
flash[:success] = t('workarea.admin.tax_categories.flash_messages.saved')
redirect_to tax_category_path(@category)
else
render :edit
end
end
|