Skip to content

Commit

Permalink
DEV: Don't explicitly load files (#143)
Browse files Browse the repository at this point in the history
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.`)
  • Loading branch information
CvX committed Sep 22, 2021
1 parent ee2ff23 commit 4626483
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ def self.plugin_name
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?
Expand Down

0 comments on commit 4626483

Please sign in to comment.