This rails project is very bare-bones, just begun, so I haven't done any weird loopholes or patching.
The model, to_s replaces school with bar if nil:
class Department < ActiveRecord::Base
belongs_to :school
def to_s
"foo" + (school || "bar")
end
end
Says the view:
can't convert ActiveRecord::Associations::BelongsToAssociation into String
about the to_s statement
but in script/console, I can take a Department d where school==nil and say
"foo" + (d.school || "bar")
and get "foobar"