I am organizing my code, so far I have managed to group controllers/helpers/views into βadminβ folders, but initially I had a library with the same module name βadminβ, m can no longer call. (name of conflict?)
New structure:
Directory Structure -> app -> controllers -> admin #new -> admin_main -> admin_permissions -> Helpers -> admin #new -> admin_main_helper -> admin_permissions_helper -> lib -> admin -> pagerduty.rb
Previously, I could call my library from my helpers as follows:
module Admin::AdminMainHelper
Error "uninitialized constant Admin::PagerDuty"
Do I need to rename my library to something else? or is there a way around this?
EDIT: It works if I rename my library module to "AdminLib" instead of "Admin", for example. So the question is, is there a way around this.
source share