I'm trying to create a URL with name-city-#, but I'm getting
... and so on
from my slugged column database.
I have this in my model:
friendly_id :slug_candidates, :use => [:slugged, :history]
Which I believe is correct and should give me the right names?
Also, before friendly_id I would be able to use `find_by_business_id(@biz)`, but because of the friendly_id, I'm getting an error:
I have this in my controller:
@biz = Business.find(params[:id])
@bizphoto = BusinessPhoto.find_by_business_id(@biz)
and in my view:
<%= image_tag @bizphoto.bizurl_url(:avatar) %>
I'm getting the error of `undefined method 'bizurl_url' for nil`, and I think its because of the `find_by` method, but I'm not sure what the correct ruby syntax is when using slug URLs now.