Hi Stackies,
I want to include this module in every ActiveRecord model in my Rails app, without dropping include NotificationResourceableTraits
in each file. Is there a way?
module NotificationResourceableTraits
def self.included(base)
base.has_many :notification_resources, :as => :notification_resourceable
base.has_many :notifications, :through => :notification_resources
end
end