Support for Embeddable Comments via IFRAME

This commit is contained in:
Robin Ward
2013-12-10 17:14:53 -05:00
parent 131bf2db2b
commit e3e4c62887
28 changed files with 672 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
class MigrateWordCounts < ActiveRecord::Migration
disable_ddl_transaction!
def up
post_ids = execute("SELECT id FROM posts WHERE word_count IS NULL LIMIT 500").map {|r| r['id'].to_i }
while post_ids.length > 0
@@ -30,4 +30,4 @@ class MigrateWordCounts < ActiveRecord::Migration
end
end
end

View File

@@ -0,0 +1,13 @@
class CreateTopicEmbeds < ActiveRecord::Migration
def change
create_table :topic_embeds, force: true do |t|
t.integer :topic_id, null: false
t.integer :post_id, null: false
t.string :embed_url, null: false
t.string :content_sha1, null: false, limit: 40
t.timestamps
end
add_index :topic_embeds, :embed_url, unique: true
end
end

View File

@@ -0,0 +1,5 @@
class AddCookMethodToPosts < ActiveRecord::Migration
def change
add_column :posts, :cook_method, :integer, default: 1, null: false
end
end

View File

@@ -1,6 +1,6 @@
class CreateTopTopics < ActiveRecord::Migration
def change
create_table :top_topics do |t|
create_table :top_topics, force: true do |t|
t.belongs_to :topic
TopTopic.periods.each do |period|