Posted by
yincan
on
August 16, 2010
override the to_s to make the method sensible instead of "display_name", "format_name"..
Change from
def display_name
"#{first_name} #{last_name}"...
end
to
def to_s
"#{first_name} #{last_name}"...
end

Comments
and to_s will be automatically called. Also I often define to_param to make more SEO friendly URL's instead of a "to_slug" method that many people define.