I am trying to use the friendly_id gem to generate a slug in the format of "#{id}-#{title}"
It looks like friendly_id uses before_save, and won't have access to the ID attribute.
Is there a work around for this ?
# Permalinks
#-----------------------------------------------------------------------------
extend FriendlyId
friendly_id :id_and_title, :use => :slugged
def id_and_title
"#{id} #{title}"
end
friendly_id
? – Oscar Mederos