Class: EducodeSales::KeyPersonController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- EducodeSales::KeyPersonController
- Defined in:
- app/controllers/educode_sales/key_person_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
#authenticate_admin, #authenticate_request, #current_user, #filter, #is_commissioner_above?, #paginate, #render_failure, #render_success, #subject_members, #subject_staffs, #subject_url
Methods included from ApplicationHelper
#add_businesses_score, #base_url, #collection_amount_score, #completion_rate, #current?, #disk_filename, #get_businesses_chart, #handled_data, #handled_time_data, #handled_time_data_accurate, #relative_path, #signed_amount_score, #storage_path, #url_to_avatar, #visits_score
Instance Method Details
#destroy ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/controllers/educode_sales/key_person_controller.rb', line 6 def destroy key_person = KeyPerson.find(params[:id]) if key_person.destroy render_success else render_failure key_person end end |
#update ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/controllers/educode_sales/key_person_controller.rb', line 15 def update key_person = KeyPerson.find(params[:id]) if key_person.update(key_params) render_success else render_failure key_peprson end end |