i have two model 'Asset' , and 'User' .'Asset' can be assigned to one 'user' and 'asset' is created by one 'user'.here is detail of model classes
class Asset < ActiveRecord::Base
belongs_to :assigned_to ,:class_name=>'User'
belongs_to :creator ,:class_name=>'User'
end
and
class User < ActiveRecord::Base
has_many :assets
end
now in assets show.html.erb i can access name of creator with
@asset.creator.name
but i can not see name of 'assigned_to'
@asset.assigned_to.name #gives nothing
both values are successfully saved in database.what is problem?