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.`)
This commit is contained in:
Jarek Radosz 2021-09-22 11:13:19 +02:00 committed by GitHub
parent ee2ff2361d
commit 4626483514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -34,12 +34,6 @@ module ::DataExplorer
end end
after_initialize do 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| add_to_class(:guardian, :user_is_a_member_of_group?) do |group|
return false if !current_user return false if !current_user
return true if current_user.admin? return true if current_user.admin?