Class: Foodcoop::WorkgroupsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Foodcoop::WorkgroupsController
- Defined in:
- app/controllers/foodcoop/workgroups_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
9 10 11 |
# File 'app/controllers/foodcoop/workgroups_controller.rb', line 9 def edit @workgroup = Workgroup.find(params[:id]) end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/foodcoop/workgroups_controller.rb', line 5 def index @workgroups = Workgroup.order('name') end |
#update ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/foodcoop/workgroups_controller.rb', line 13 def update @workgroup = Workgroup.find(params[:id]) if @workgroup.update(params[:workgroup]) redirect_to foodcoop_workgroups_url, notice: I18n.t('workgroups.update.notice') else render action: 'edit' end end |