I have a model property with has_many. I find the property and then I
need to find the name of the building or the neighborhood that the
property belongs to. The property is not always assigned a building or
This becomes a problem when createing permalinks with permalink_fu.
has_permalink [:neighborhood_name, :building_name, :address]
The neighborhood name and building name are defined here in property.rb
If the property does not have a neighborhood or a building, then I get
The error occurred while evaluating nil.name):
I know that I'm missing something really basic in Rails. Can someone
help me out so that it generates the permalink even if the neighborhood
or building are empty?