Generate reposts model/table that stores the repost history.

This commit is contained in:
Señor Rolando 2013-12-08 12:56:04 +01:00
parent 07f8b4c7d8
commit 37cff9c4ba
4 changed files with 32 additions and 0 deletions

2
app/models/repost.rb Normal file
View file

@ -0,0 +1,2 @@
class Repost < ActiveRecord::Base
end

View file

@ -0,0 +1,12 @@
class CreateReposts < ActiveRecord::Migration
def change
create_table :reposts do |t|
t.string :mentioned
t.bigint :postid
t.bigint :repostid
t.timestamps
end
add_index :reposts, :repostid
end
end

11
test/fixtures/reposts.yml vendored Normal file
View file

@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
mentioned: MyString
postid:
repostid:
two:
mentioned: MyString
postid:
repostid:

View file

@ -0,0 +1,7 @@
require 'test_helper'
class RepostTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end