1

How can we have two methods for after_add callback on mongoid relations. Both the methods need to do different things?

has_and_belongs_to_many :posts, after_add: method1, after_add: method2

Asma
  • 23
  • 3

1 Answers1

0

try this

 has_and_belongs_to_many :posts, after_add: [:method1, :method2]
abhas
  • 5,193
  • 1
  • 32
  • 56