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.74 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.73 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.72 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.71 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.70 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.59 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.58 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.49 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.48 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.46 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.41 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.37 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.36 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.35 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.34 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.33 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.31 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.30 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.29 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.28 app/controllers/educode_sales/key_person_controller.rb