Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
starswan committed Dec 19, 2024
1 parent d00be2c commit 9824af1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def form_attributes
def qualification_params
case action_name
when "new", "select_category", "submit_category", "confirm_destroy"
(params[qualification_form_param_key(category)] || params).permit(:category)
(params[qualification_form_param_key(@category)] || params).permit(:category)
when "create", "edit", "update"
params.require(qualification_form_param_key(category))
params.require(qualification_form_param_key(@category))
.permit(:category, :finished_studying, :finished_studying_details, :grade, :institution, :name, :subject, :year, qualification_results_attributes: %i[id subject grade])
end
end
Expand All @@ -88,6 +88,6 @@ def qualification
end

def secondary?
category.in?(Qualification::SECONDARY_QUALIFICATIONS)
@category.in?(Qualification::SECONDARY_QUALIFICATIONS)
end
end

0 comments on commit 9824af1

Please sign in to comment.