I have two tables… One belongs to another. Why can’t I reference
Specifically, using scaffolding:
@property_pages, @properties = paginate :properties, :per_page => 10
- <% for property in @properties %>
<% for column in Property.content_columns %>
<%=h property.send(column.name) %>
<% end %>
<td><%=h property.propertytype.name %></td>
- <% end %>
- I get an error stating that I am trying to reference the propertytype
method on line #8. I thought I was doing this right, I’m using the
local variable (not the instance variable which is an array of objects
in this case).
- Am I doing my has_one and belongs_to statements right? Some
documentation seems to say that you only need to use has_one and you
don’t need belongs to? I thought you always needed them as a pair?