Я пытаюсь отобразить этот объект в моем представлении
---
- !ruby/object:Customer
attributes:
country: United Kingdom
last_name: a
first_name: b
attributes_cache: {}
histories:
- !ruby/object:History
attributes:
start_date: 11/03/2010
finish_date:
attributes_cache: {}
Я думал, что вы получите доступ к start_date, выполнив
<% @customers.each do |customer| %>
<%= customer.histories.start_date %>
<% end %>
но я получаю
undefined method `start_date'
Это находка, которую я использовал
@customers = Customer.find(:all,
:conditions =>['customers.id IN (?)', intersection],
:include => :histories
)
Что я делаю не так?
Спасибо