aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db.rb11
-rw-r--r--db/init.rb11
-rw-r--r--models/comment.rb (renamed from db/comment.rb)0
-rw-r--r--models/config.rb (renamed from db/config.rb)0
-rw-r--r--models/post.rb (renamed from db/post.rb)0
-rw-r--r--models/tag.rb (renamed from db/tag.rb)2
6 files changed, 12 insertions, 12 deletions
diff --git a/db.rb b/db.rb
new file mode 100644
index 0000000..4c18111
--- /dev/null
+++ b/db.rb
@@ -0,0 +1,11 @@
+require 'active_record'
+
+ActiveRecord::Base.establish_connection(
+ adapter: 'sqlite3',
+ database: 'db.sqlite3'
+)
+
+require_relative 'models/config'
+require_relative 'models/comment'
+require_relative 'models/post'
+require_relative 'models/tag'
diff --git a/db/init.rb b/db/init.rb
deleted file mode 100644
index 7c08faf..0000000
--- a/db/init.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'active_record'
-
-ActiveRecord::Base.establish_connection(
- adapter: 'sqlite3',
- database: 'db.sqlite3'
-)
-
-require_relative 'config'
-require_relative 'comment'
-require_relative 'post'
-require_relative 'tag'
diff --git a/db/comment.rb b/models/comment.rb
index b3977f6..b3977f6 100644
--- a/db/comment.rb
+++ b/models/comment.rb
diff --git a/db/config.rb b/models/config.rb
index 55b4106..55b4106 100644
--- a/db/config.rb
+++ b/models/config.rb
diff --git a/db/post.rb b/models/post.rb
index 1d44051..1d44051 100644
--- a/db/post.rb
+++ b/models/post.rb
diff --git a/db/tag.rb b/models/tag.rb
index 7f3446c..9c24b6c 100644
--- a/db/tag.rb
+++ b/models/tag.rb
@@ -1,4 +1,4 @@
-class PostTagLink < Active::Base
+class PostTagLink < ActiveRecord::Base
belongs_to :post
belongs_to :tag
end