Followed this post How to use concerns in Rails 4 to try to get concern to work. But it doesnt load the concern.
Would it be possible to add a concern like this to a model I have no control over or how should I do that? Ex if I want to add the concern to a model from a gem I am using.
I have added concern autoload in application.rb
config.autoload_paths += %W(#{config.root}/app/models/concerns)
I checked how Spree Commerce does it in the docs but that method doesn't work at all for me.
# app/models/concerns/schedule.rb
module Schedule
extend ActiveSupport::Concern
...
end
Namespace::Trader.include Schedule