Skip to content

Commit

Permalink
Make people_skills_controller an actual people skills controller inst…
Browse files Browse the repository at this point in the history
…ead of a person controller
  • Loading branch information
RandomTannenbaum committed Jul 3, 2024
1 parent 8c6a7eb commit fee9ae2
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions app/controllers/people/people_skills_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@

class People::PeopleSkillsController < CrudController
include ParamConverters
self.permitted_attrs = [{ people_skills_attributes: [:id, :certificate, :level, :interest,
:core_competence, :skill_id, :unrated,
:_destroy] }]
before_action :set_person

def self.model_class
Person
end
self.permitted_attrs = [:id, :certificate, :level, :interest, :core_competence, :skill_id,
:unrated, :skill_ids, :_destroy, { skill_attributes:
[:id, :title, :radar, :portfolio, :default_set, :category_id] }]
self.nesting = Person
layout 'person'

def update
@people_skills = filtered_people_skills
Expand All @@ -28,10 +25,6 @@ def show_path

private

def set_person
@person = Person.find(params[:id])
end

def filtered_people_skills
return @person.people_skills if params[:rating].blank?

Expand Down

0 comments on commit fee9ae2

Please sign in to comment.