Class: Renalware::Pathology::CodeGroupsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- BaseController
- Renalware::Pathology::CodeGroupsController
- Defined in:
- app/controllers/renalware/pathology/code_groups_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Instance Method Details
#edit ⇒ Object
18 19 20 |
# File 'app/controllers/renalware/pathology/code_groups_controller.rb', line 18 def edit render locals: { group: } end |
#index ⇒ Object
8 9 10 11 12 |
# File 'app/controllers/renalware/pathology/code_groups_controller.rb', line 8 def index groups = CodeGroup.order(:name) groups, :index? render locals: { groups: groups } end |
#show ⇒ Object
14 15 16 |
# File 'app/controllers/renalware/pathology/code_groups_controller.rb', line 14 def show render locals: { group: } end |
#update ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'app/controllers/renalware/pathology/code_groups_controller.rb', line 22 def update group = if group.update_by(current_user, code_group_params) redirect_to pathology_code_groups_path, notice: "Group saved" else render :edit, locals: { group: group } end end |