Вот что у меня есть.
item.rb:
has_many :comments
belongs_to :user
user.rb:
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :display_name
has_many :items
has_many :comments, :through => :items
comment.rb:
belongs_to :item
belongs_to :user
delegate :display_name, :to => :user, :prefix => true
но <%= comment.user_display_name%>
возвращается
Comment#user_display_name delegated to user.display_name, but user is nil:
#<Comment id: 16, body: "fdsfsd", commenter_id: 1, item_id: 2, created_at:
"2012-03-07 23:41:10", updated_at: "2012-03-07 23:41:10">