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.6 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.5 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.3 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.2 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.1 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.10.0 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.0.9 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.0.8 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.0.7 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.0.6 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.0.5 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.0.4 app/controllers/educode_sales/key_person_controller.rb
educode_sales-1.0.3 app/controllers/educode_sales/key_person_controller.rb