From 46264835145e32fe29518841b2810faf6e716152 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 22 Sep 2021 11:13:19 +0200 Subject: [PATCH] DEV: Don't explicitly load files (#143) 1. It doesn't seem to be necessary? 2. It looks like it was triggering some warnings (`Creating scope :for_group. Overwriting existing method DataExplorer::Query.for_group.`) --- plugin.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugin.rb b/plugin.rb index 8a4d7fb..c49ab3b 100644 --- a/plugin.rb +++ b/plugin.rb @@ -34,12 +34,6 @@ module ::DataExplorer end after_initialize do - load File.expand_path('../app/models/data_explorer/query.rb', __FILE__) - load File.expand_path('../app/controllers/data_explorer/query_controller.rb', __FILE__) - load File.expand_path('../app/serializers/data_explorer/query_serializer.rb', __FILE__) - load File.expand_path('../app/serializers/data_explorer/small_badge_serializer.rb', __FILE__) - load File.expand_path('../app/serializers/data_explorer/small_post_with_excerpt_serializer.rb', __FILE__) - add_to_class(:guardian, :user_is_a_member_of_group?) do |group| return false if !current_user return true if current_user.admin?