FEATURE: add a way to map arbitrary urls to a topic, post, or category. Useful for sites that have migrated to Discourse and want to redirect from their old site to Discourse with 301 redirects.

This commit is contained in:
Neil Lalonde
2014-08-28 15:09:36 -04:00
parent 8a6c4234fc
commit 14890a6002
9 changed files with 156 additions and 0 deletions

View File

@ -0,0 +1,14 @@
class CreatePermalinks < ActiveRecord::Migration
def change
create_table :permalinks do |t|
t.string :url, null: false
t.integer :topic_id
t.integer :post_id
t.integer :category_id
t.timestamps
end
add_index :permalinks, :url
end
end