I recently authored a gem called ‘setting’ (found here). The extends ActiveRecord with a module named ‘Setting’. I understand that gems are supposed to use the namespace they are named, however when testing this caused collisions with ActiveRecord models with the same name (a Setting model). Does a standard exist for creating a private module namespace? I don’t need users of the gem to ever access the module outside the extension in ActiveRecord. Do I have any options outside of picking a less common name?
I recently authored a gem called ‘setting’ (found here ). The extends ActiveRecord with
Share
Since you’re writing an Active Record extension, you could place your module inside the
ActiveRecordnamespace:Other than that, no, there’s no practical namespace solution for gems with very common names.