NewbieQ: Redisplaying Categorized Comments

Greetings,
As my first web app with Rails I am creating an HR Tracking program.
There are employee 'records' that can have 'comments' added to each
record. I also assign each comment a category such as 'general note',
'disciplinary action', or 'job changes' which I've set in my Comments
table using the values either 0, 1, or 2.

I can create the comments fine, but difficulty I am having is
seperating the comments into different areas of the employee record
page based on the category. So, for example, if I want to add a
comment like 'Employee was promoted to manager' and assign it a
category of 'job changes', I would then want that comment to display
in a list below the heading 'Job Changes' on that records 'show' page
just above the comment form.

The best way I can think of is doing something like:
<% if comment_type = 1 %>
<% for comment in @record.comments %>
  <% end %>
  <% end %>
  but I can't seem to get the syntax correct. Can anyone assist? Below
is my code and layout.