Ok, your error lies in the fact that you’re not using the magic names for your fields, which can be solved two ways:
#1 Use the magic names -> change ParentPolicyId to policy_id
#2 Use the code that lets you specify your own:
belongs_to :policy, :foreign_key => ‘ParentPolicyId’
has_many :standards, :foreign_key => ‘ParentPolicyId’
One more point of interest to you:
In your rhtml, you’re doing policy.standard.StandardName… since a Policy has_many Standards, you can’t do that.
You would need something like the following:
<% Policy.standards.each do |standard| %>
<% end %>
That loops through all the standards, and displays the name of each one.