DEV: explicitly require Rails components

`rails/all` includes too much stuff per: https://github.com/rails/rails/blob/master/railties/lib/rails/all.rb

This commit makes it explicit what pieces of Rails Discourse depends on.

Previously the LoadError was protecting us and we were excluding components,
using the Gemfile, this method ensures that even if we add `rails` meta gem
as a dependency only the parts of Rails Discourse uses will be used.
This commit is contained in:
Sam 2019-02-06 17:45:48 +11:00
parent fe7c10b409
commit 15857b900a

View File

@ -14,7 +14,11 @@ rescue
end
require File.expand_path('../boot', __FILE__)
require 'rails/all'
require 'active_record/railtie'
require 'action_controller/railtie'
require 'action_view/railtie'
require 'action_mailer/railtie'
require 'sprockets/railtie'
# Plugin related stuff
require_relative '../lib/discourse_event'