You have two options.
1.As @gregates suggested you should add foreign_key
to your association in your Condition
model
class Condition < ActiveRecord::Base
belongs_to :category, class_name: 'ConditionCategory',
foreign_key: 'condition_category_id'
end
OR
2.Just modify your Condition
model like this.Which is very simple and precise.
class Condition < ActiveRecord::Base
belongs_to :condition_category
end
And in your view,you have to change like this
<td><%= condition.condition_category.name %></td>
to get the name of the condition_category
associated with that condition