I am new to friendly-id and i have this in my post.rb model
extend FriendlyId
friendly_id :title, use: :slugged
and friendly_id generator migration is
def change
create_table :friendly_id_slugs do |t|
t.string :slug, :null => false
t.integer :sluggable_id, :null => false
t.string :sluggable_type, :limit => 50
t.string :scope
t.datetime :created_at
end
add_index :friendly_id_slugs, :sluggable_id
add_index :friendly_id_slugs, [:slug, :sluggable_type]
add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], :unique => true
add_index :friendly_id_slugs, :sluggable_type
end
and i added slug attribute with this migration
def change
add_column :posts, :slug, :string
add_index :posts, :slug
Post.find_each(&:save)
end
but I want use permalink instead of slug field like post.permalink what i really need to change?