Remove unused module from lib

I was looking for library files that may be used but are not loaded.
I would then add the missing `require` statements. But I found that this
module isn't used any more.

Usage removed in:
310d1b3726
This commit is contained in:
Maikel Linke
2020-08-14 10:56:20 +10:00
parent b79c568b08
commit 0a1947ae34
2 changed files with 0 additions and 9 deletions

View File

@@ -1037,7 +1037,6 @@ Style/FrozenStringLiteralComment:
- 'lib/open_food_network/i18n_config.rb'
- 'lib/open_food_network/lettuce_share_report.rb'
- 'lib/open_food_network/locking.rb'
- 'lib/open_food_network/model_class_from_controller_name.rb'
- 'lib/open_food_network/order_and_distributor_report.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'
- 'lib/open_food_network/order_cycle_management_report.rb'

View File

@@ -1,8 +0,0 @@
module OpenFoodNetwork
module ModelClassFromControllerName
# Equivalent to CanCan's "authorize_resource :class => false" (see https://github.com/ryanb/cancan/blob/master/lib/cancan/controller_resource.rb#L146)
def model_class
self.class.to_s.sub("Controller", "").underscore.split('/').last.singularize.to_sym
end
end
end