This is by design. ActiveRecord
is 'lazy' by default, it only fetches the fee
data when you access @teacher.fee
for the first time.
In case you want to load both at the same time, you should use 'eager loading' by adding includes
like this:
@teacher = Teacher.includes(:fee).find(id)
Here are a couple of references for 'eager loading':
http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations http://railscasts.com/episodes/22-eager-loading-revised