Sha256: cc966adf04aa3366a55d7b5980cf1381191a1aa427b7cde274bc01e3fe6275bf

Contents?: true

Size: 623 Bytes

Versions: 53

Compression:

Stored size: 623 Bytes

Contents

require_dependency "educode_sales/application_controller"

module EducodeSales
  class KeyPersonController < ApplicationController

    def destroy
      key_person = KeyPerson.find(params[:id])
      if key_person.destroy
        render_success
      else
        render_failure key_person
      end
    end

    def update
      key_person = KeyPerson.find(params[:id])
      if key_person.update(key_params)
        render_success
      else
        render_failure key_peprson
      end
    end

    private
    def key_params
      params.permit(:attitude_id, :sex, :birth_date, :remark, :tel, :name)
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
educode_sales-1.10.26 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.25 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.24 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.23 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.22 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.21 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.20 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.19 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.18 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.17 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.16 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.15 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.14 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.13 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.12 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.11 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.10 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.9 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.8 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.7 app/controllers/educode_sales/key_person_controller.rb