many things, comments working.

This commit is contained in:
jomo
2013-06-24 13:29:39 +02:00
parent 7a894f4f6a
commit fb52e8bed2
44 changed files with 490 additions and 223 deletions

View File

@@ -1,6 +1,6 @@
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
create_table :users do |t|
t.string :name, :unique => true, :null => false
t.string :ign, :unique => true, :null => false
t.integer :rank, :default => 10, :null => false
@@ -9,6 +9,10 @@ class CreateUsers < ActiveRecord::Migration
t.text :about
t.string :password_digest, :null => false
t.string :last_ip
t.string :skype
t.boolean :skype_public, :default => false
t.datetime :last_login
t.datetime :last_active
t.timestamps
end

View File

@@ -3,7 +3,7 @@ class CreateBlogposts < ActiveRecord::Migration
create_table :blogposts do |t|
t.string :title
t.text :text
t.integer :user_id
t.references :user
t.timestamps
end

View File

@@ -3,7 +3,7 @@ class CreateComments < ActiveRecord::Migration
create_table :comments do |t|
t.text :text
t.integer :user_id
t.integer :blogpost_id
t.references :blogpost
t.timestamps
end

View File

@@ -38,6 +38,10 @@ ActiveRecord::Schema.define(:version => 20130526020734) do
t.text "about"
t.string "password_digest", :null => false
t.string "last_ip"
t.string "skype"
t.boolean "skype_public", :default => false
t.datetime "last_login"
t.datetime "last_active"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

View File

@@ -1,4 +1,21 @@
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
User.create(name: "Redstone Sheep", ign: "noobkackboon", email: "theredstonesheep@gmail.com", about: "Hi, I am the admin :)", password: "123", password_confirmation: "123")
User.create(
name: "Redstone Sheep",
ign: "noobkackboon",
email: "theredstonesheep@gmail.com",
about: "Hi, I am the admin :)",
password: "123",
password_confirmation: "123",
rank: 500
)
User.create(
name: "Tarkztor",
ign: "TraksAG",
email: "tacko@gmail.com",
about: "Hi, I am another user :)",
password: "123",
password_confirmation: "123",
rank: 10
)