0

As far as I understand, what defines a Rails component/module is that it subclasses an own Railtie class from Rails::Railtie (the latter being an interface and being unable of being instantiated.)

How do the components/modules get loaded and how do I swap for example ActiveRecord with my own ORM-module?

Yours,

von Spotz

von spotz
  • 875
  • 7
  • 17
  • This is an extremely broad question where the answer would basically be a book about the ruby object model, how rails architecture works and the pros/cons of monkeypatching. – max Oct 07 '16 at 17:05
  • If you want to swap the ORM to for example Mongoid you usually remove line that requires the ActiveRecord railtie from `config/application.rb`. And remove any config settings relating to AR. You would probably get better answers if you actually describe what the goal is - not how you think you should get there. – max Oct 07 '16 at 17:09

0 Answers0