diff options
author | John Ankarström <john@ankarstrom.se> | 2021-03-02 00:10:03 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-03-02 00:10:03 +0100 |
commit | 7640f27b9e183c6e9a00249c352e3515d3f90c75 (patch) | |
tree | e58d598bbaa577b541559b9bd0380ba2d4665264 | |
parent | 4e18684bb21564ee1d9c616b9cf1eece3a241f8c (diff) | |
download | comb-7640f27b9e183c6e9a00249c352e3515d3f90c75.tar.gz |
Rename db directory to models
-rw-r--r-- | db.rb | 11 | ||||
-rw-r--r-- | db/init.rb | 11 | ||||
-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
@@ -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 |