I am using friendly_id as follows:
class Page < ActiveRecord::Base
extend FriendlyId
friendly_id :title, :use => [:slugged, :history]
end
I would like to be able to set the slug (i.e. be able to set a custom URL) without changing the title and maintaining old slugs in history.
Is there a straightforward way to do this using friendly_id or will I need to interact with the history table?
Thanks!
I accomplished this by adding an instance attribute
url_seed:Now, on save, if
url_seedis set,friendly_iduses the custom URL text to set the URL. Works like a charm 🙂