aboutsummaryrefslogtreecommitdiff
path: root/interfaces/ruby/ruby.rb
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-03-02 19:38:59 +0100
committerJohn Ankarström <john@ankarstrom.se>2021-03-02 19:38:59 +0100
commit1c956e662bb2072fa6e769ec5599dfab6db2c829 (patch)
tree2a964b3bec40a7897eaf4adeaf183c1298edaac1 /interfaces/ruby/ruby.rb
parentc8e09cc8ec756014268405470fdc45db6e0acb95 (diff)
downloadcomb-1c956e662bb2072fa6e769ec5599dfab6db2c829.tar.gz
Load models and sub-interfaces manually instead
I realized that this is more flexible, as it allows the user to comment out whatever models/sub-interfaces they don't want to use. Adding a new model or sub-interface requires a tiny bit more work, but I think it's worth it.
Diffstat (limited to 'interfaces/ruby/ruby.rb')
-rw-r--r--interfaces/ruby/ruby.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/interfaces/ruby/ruby.rb b/interfaces/ruby/ruby.rb
index ffd6d6a..d5c0e9c 100644
--- a/interfaces/ruby/ruby.rb
+++ b/interfaces/ruby/ruby.rb
@@ -5,6 +5,7 @@ ActiveRecord::Base.establish_connection(
database: "#{__dir__}/../../db.sqlite3"
)
-Dir.glob('models/*.rb', base: __dir__).each do |f|
- require_relative f
-end
+require_relative 'models/comment'
+require_relative 'models/config'
+require_relative 'models/post'
+require_relative 'models/tag'